Commit 0cef042c authored by Jens Gustedt's avatar Jens Gustedt
Browse files

add some fifo initialization

parent faa6f16e
......@@ -56,7 +56,7 @@ void *aligned_alloc(size_t p00_alignment, size_t p00_size) {
/* In both cases this is guaranteed to do the correct
initialization. */
P99_WEAK(p00_cb)
p99_callback_stack p00_at_quick_exit;
p99_callback_stack p00_at_quick_exit = P99_LIFO_INITIALIZER(0);
/**
** @brief registers the function pointed to by @a p00_void_func, to be called
......
......@@ -32,7 +32,7 @@
# define P99_LIFO_DECLARE(T) \
typedef T P99_PASTE2(p00_lifo_, T); \
P99_DECLARE_ATOMIC(P99_PASTE2(p00_lifo_, T))
# define P99_LIFO_INITIALIZER(VAL) ATOMIC_VAR_INIT((void*)VAL)
/**
** @brief Return a pointer to the top element of an atomic LIFO @a L
......@@ -134,6 +134,7 @@ P00_DOCUMENT_PERMITTED_ARGUMENT(P99_LIFO_CLEAR, 0)
# define P99_LIFO(T) P99_PASTE2(p00_lifo_, T)
# define P99_LIFO_DECLARE(T) typedef T P99_LIFO(T)
# define P99_LIFO_INITIALIZER(VAL) ((void*)VAL)
#define P99_LIFO_TOP(L) (*(L))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment