Added __init_once(), an almost exact clone of pthread_once(), with the

difference that the initialization function has an additional void* argument,
so that it is suitable for initializing stuff in objects.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34400 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2009-12-01 09:34:58 +00:00
parent bc0693b219
commit 840be9d6e6
2 changed files with 93 additions and 0 deletions
+7
View File
@@ -81,6 +81,13 @@ status_t lazy_recursive_lock_lock(lazy_recursive_lock *lock);
void lazy_recursive_lock_unlock(lazy_recursive_lock *lock);
int32 lazy_recursive_lock_get_recursion(lazy_recursive_lock *lock);
#define INIT_ONCE_UNINITIALIZED -1
#define INIT_ONCE_INITIALIZED -4
status_t __init_once(vint32* control, status_t (*initRoutine)(void*),
void* data);
#ifdef __cplusplus
} // extern "C"