1 /* 2 * Copyright 2008, Haiku Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef KERNEL_XSI_SEMAPHORE_H 6 #define KERNEL_XSI_SEMAPHORE_H 7 8 #include <sys/sem.h> 9 #include <sys/cdefs.h> 10 11 #include <OS.h> 12 13 #include <kernel.h> 14 #include <posix/xsi_semaphore_defs.h> 15 16 17 __BEGIN_DECLS 18 19 extern void xsi_sem_init(); 20 extern void xsi_sem_undo(struct team *team); 21 22 /* user calls */ 23 int _user_xsi_semget(key_t key, int numberOfSemaphores, int flags); 24 int _user_xsi_semctl(int semaphoreID, int semaphoreNumber, int command, 25 union semun* args); 26 status_t _user_xsi_semop(int semaphoreID, struct sembuf *semOps, 27 size_t numSemOps); 28 29 __END_DECLS 30 31 #endif /* KERNEL_XSI_SEMAPHORE_H */ 32