summaryrefslogtreecommitdiff
path: root/src/shared.h
diff options
context:
space:
mode:
author@syxhe <https://t.me/syxhe>2025-04-21 21:26:23 -0500
committer@syxhe <https://t.me/syxhe>2025-04-21 21:26:23 -0500
commit521e9a2fc8e0ef1dffe4e590d0d4f65292f0d1df (patch)
treeb85e149b645dcdaa4ef2a7345a4898c39a683f8d /src/shared.h
parent9cf4667331b97f1123f4156273a46558e27c2d2d (diff)
Implement a Concurrent Queue
Diffstat (limited to 'src/shared.h')
-rw-r--r--src/shared.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/shared.h b/src/shared.h
index 1a629e6..3b0a5f7 100644
--- a/src/shared.h
+++ b/src/shared.h
@@ -76,10 +76,13 @@ int cleanup_fire(cleanup * const loc);
76 76
77/* Cleanup environment creator. Automatically defines the variables `__CLEANUP`, `__CLEANUP_FUNCS`, and `__CLEANUP_ARGS` and initializes 77/* Cleanup environment creator. Automatically defines the variables `__CLEANUP`, `__CLEANUP_FUNCS`, and `__CLEANUP_ARGS` and initializes
78// via `cleanup_init()` using these variables. */ 78// via `cleanup_init()` using these variables. */
79#define cleanup_create(size) \ 79#define cleanup_CREATE(size) \
80cleanup __CLEANUP; \ 80cleanup __CLEANUP; \
81cleanup_callback __CLEANUP_FUNCS[(size)]; \ 81cleanup_callback __CLEANUP_FUNCS[(size)]; \
82void *__CLEANUP_ARGS[(size)]; \ 82void *__CLEANUP_ARGS[(size)]; \
83cleanup_init(&__CLEANUP, (size), __CLEANUP_FUNCS, __CLEANUP_ARGS) 83cleanup_init(&__CLEANUP, (size), __CLEANUP_FUNCS, __CLEANUP_ARGS)
84 84
85#define cleanup_REGISTER(cb, arg) cleanup_register(&__CLEANUP, (cb), (arg))
86#define cleanup_CNDREGISTER(flag, cb, arg) cleanup_cndregister(&__CLEANUP, (flag), (cb), (arg))
87
85#endif \ No newline at end of file 88#endif \ No newline at end of file