From 7d83e5c7816b5e343695a75ba58b32dbe1be969a Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 1 Oct 2007 20:16:28 +0000 Subject: move all sources down to a seperate src/ tree git-svn-id: file:///home/lennart/svn/public/libsydney/trunk@34 9ba3c220-e4d3-45a2-8aa3-73fcc9aff6ce --- src/once.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/once.h (limited to 'src/once.h') diff --git a/src/once.h b/src/once.h new file mode 100644 index 0000000..a374529 --- /dev/null +++ b/src/once.h @@ -0,0 +1,17 @@ +#ifndef foosydneyoncehfoo +#define foosydneyoncehfoo + +#include "mutex.h" + +typedef struct sa_once { + unsigned int once_value; + sa_mutex_t *mutex; +} sa_once_t; + +#define SA_ONCE_INIT { .once_value = 0, .mutex = NULL } + +typedef void (*sa_once_func_t) (void); + +int sa_once(sa_once_t *o, sa_once_func_t f); + +#endif -- cgit