2 * Copyright 2008, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
5 #ifndef KERNEL_REALTIME_SEM_H
6 #define KERNEL_REALTIME_SEM_H
10 #include <sys/types.h>
14 #include <posix/realtime_sem_defs.h>
17 struct realtime_sem_context
;
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
);
40 #endif // KERNEL_REALTIME_SEM_H