1 /* 2 * Copyright 2010, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _KERNEL_USER_MUTEX_H 6 #define _KERNEL_USER_MUTEX_H 7 8 9 #include <SupportDefs.h> 10 11 12 #ifdef __cplusplus 13 extern "C" { 14 #endif 15 16 void user_mutex_init(); 17 18 status_t _user_mutex_lock(int32* mutex, const char* name, uint32 flags, 19 bigtime_t timeout); 20 status_t _user_mutex_unlock(int32* mutex, uint32 flags); 21 status_t _user_mutex_switch_lock(int32* fromMutex, int32* toMutex, 22 const char* name, uint32 flags, bigtime_t timeout); 23 status_t _user_mutex_sem_acquire(int32* sem, const char* name, uint32 flags, 24 bigtime_t timeout); 25 status_t _user_mutex_sem_release(int32* sem); 26 27 #ifdef __cplusplus 28 } 29 #endif 30 31 32 #endif /* _KERNEL_USER_MUTEX_H */ 33