Added and implemented new system calls switch_sem() and switch_sem_etc(); even if
they are public now, they might become private later on. It's almost the same as acquire_sem() but allows you to release another semaphore atomically. This makes condvar implementations and the like very simple to do. Added B_CHECK_PERMISSION flags to the user calls, although it's not honored yet. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11887 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -46,6 +46,9 @@ extern status_t _kern_get_safemode_option(const char *parameter, char *buffer,
|
||||
/* sem functions */
|
||||
extern sem_id _kern_create_sem(int count, const char *name);
|
||||
extern status_t _kern_delete_sem(sem_id id);
|
||||
extern status_t _kern_switch_sem(sem_id releaseSem, sem_id id);
|
||||
extern status_t _kern_switch_sem_etc(sem_id releaseSem, sem_id id, uint32 count,
|
||||
uint32 flags, bigtime_t timeout);
|
||||
extern status_t _kern_acquire_sem(sem_id id);
|
||||
extern status_t _kern_acquire_sem_etc(sem_id id, uint32 count, uint32 flags, bigtime_t timeout);
|
||||
extern status_t _kern_release_sem(sem_id id);
|
||||
|
||||
Reference in New Issue
Block a user