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
17namespace BKernel {
18	struct Team;
19}
20
21using BKernel::Team;
22
23
24__BEGIN_DECLS
25
26extern void xsi_sem_init();
27extern void xsi_sem_undo(Team *team);
28
29/* user calls */
30int _user_xsi_semget(key_t key, int numberOfSemaphores, int flags);
31int _user_xsi_semctl(int semaphoreID, int semaphoreNumber, int command,
32	union semun* args);
33status_t _user_xsi_semop(int semaphoreID, struct sembuf *semOps,
34	size_t numSemOps);
35
36__END_DECLS
37
38#endif	/* KERNEL_XSI_SEMAPHORE_H */
39