Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 0cef042c authored by Jens Gustedt's avatar Jens Gustedt
Browse files

add some fifo initialization

parent faa6f16e
No related branches found
No related tags found
No related merge requests found
...@@ -56,7 +56,7 @@ void *aligned_alloc(size_t p00_alignment, size_t p00_size) { ...@@ -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 /* In both cases this is guaranteed to do the correct
initialization. */ initialization. */
P99_WEAK(p00_cb) 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 ** @brief registers the function pointed to by @a p00_void_func, to be called
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
# define P99_LIFO_DECLARE(T) \ # define P99_LIFO_DECLARE(T) \
typedef T P99_PASTE2(p00_lifo_, T); \ typedef T P99_PASTE2(p00_lifo_, T); \
P99_DECLARE_ATOMIC(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 ** @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) ...@@ -134,6 +134,7 @@ P00_DOCUMENT_PERMITTED_ARGUMENT(P99_LIFO_CLEAR, 0)
# define P99_LIFO(T) P99_PASTE2(p00_lifo_, T) # define P99_LIFO(T) P99_PASTE2(p00_lifo_, T)
# define P99_LIFO_DECLARE(T) typedef T P99_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)) #define P99_LIFO_TOP(L) (*(L))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment