btrfs: [] on the end of a struct field is a variable length array.
[haiku.git] / headers / private / kernel / posix / realtime_sem.h
blob1fd8c5afd2a52f9add6876e45178c96e87fa6cbe
1 /*
2 * Copyright 2008, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef KERNEL_REALTIME_SEM_H
6 #define KERNEL_REALTIME_SEM_H
8 #include <semaphore.h>
9 #include <sys/cdefs.h>
10 #include <sys/types.h>
12 #include <OS.h>
14 #include <posix/realtime_sem_defs.h>
17 struct realtime_sem_context;
20 __BEGIN_DECLS
22 void realtime_sem_init();
23 void delete_realtime_sem_context(struct realtime_sem_context* context);
24 struct realtime_sem_context* clone_realtime_sem_context(
25 struct realtime_sem_context* context);
27 status_t _user_realtime_sem_open(const char* name, int openFlagsOrShared,
28 mode_t mode, uint32 semCount, sem_t* userSem,
29 sem_t** _usedUserSem);
30 status_t _user_realtime_sem_close(sem_id semID, sem_t** _deleteUserSem);
31 status_t _user_realtime_sem_unlink(const char* name);
33 status_t _user_realtime_sem_get_value(sem_id semID, int* value);
34 status_t _user_realtime_sem_post(sem_id semID);
35 status_t _user_realtime_sem_wait(sem_id semID, bigtime_t timeout);
37 __END_DECLS
40 #endif // KERNEL_REALTIME_SEM_H