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:
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user