1 /* -*- Mode: C; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
4 // Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
5 // ---------------------------------------------------------------------------
6 // SquirrelJME is under the Mozilla Public License Version 2.0.
7 // See license.mkd for licensing and copyright information.
8 // -------------------------------------------------------------------------*/
16 #ifndef SQUIRRELJME_CLEANUP_H
17 #define SQUIRRELJME_CLEANUP_H
20 #include "sjme/alloc.h"
24 #ifndef SJME_CXX_IS_EXTERNED
25 #define SJME_CXX_IS_EXTERNED
26 #define SJME_CXX_SQUIRRELJME_CLEANUP_H
29 #endif /* #ifdef SJME_CXX_IS_EXTERNED */
30 #endif /* #ifdef __cplusplus */
32 /*--------------------------------------------------------------------------*/
34 /** Special enqueue data that represents this is an identity. */
35 #define SJME_NVM_ENQUEUE_IDENTITY ((sjme_pointer)(0x1234))
38 * Handler for any weak references which have been enqueued.
40 * @param weak The weak reference.
41 * @param data The data for the enqueue.
42 * @param isBlockFree Is this a block free or a weak free?
43 * @return Any resultant error, if any.
46 sjme_errorCode
sjme_nvm_enqueueHandler(
47 sjme_attrInNotNull sjme_alloc_weak weak
,
48 sjme_attrInNullable sjme_pointer data
,
49 sjme_attrInValue sjme_jboolean isBlockFree
);
51 /*--------------------------------------------------------------------------*/
55 #ifdef SJME_CXX_SQUIRRELJME_CLEANUP_H
57 #undef SJME_CXX_SQUIRRELJME_CLEANUP_H
58 #undef SJME_CXX_IS_EXTERNED
59 #endif /* #ifdef SJME_CXX_SQUIRRELJME_CLEANUP_H */
60 #endif /* #ifdef __cplusplus */
62 #endif /* SQUIRRELJME_CLEANUP_H */