1/*
2 * Copyright 2002-2005, Axel D��rfler, axeld@pinc-software.de. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
5
6
7#include <OS.h>
8#include <syscalls.h>
9
10
11sem_id
12create_sem(int32 count, const char *name)
13{
14	return _kern_create_sem(count, name);
15}
16
17
18status_t
19delete_sem(sem_id id)
20{
21	return _kern_delete_sem(id);
22}
23
24
25status_t
26acquire_sem(sem_id id)
27{
28	return _kern_acquire_sem(id);
29}
30
31
32status_t
33acquire_sem_etc(sem_id id, int32 count, uint32 flags, bigtime_t timeout)
34{
35	return _kern_acquire_sem_etc(id, count, flags, timeout);
36}
37
38
39// ToDo: the next two calls (switch_sem()) are not yet public API; no decision
40//	has been made yet, so they may get changed or removed until R1
41
42status_t
43switch_sem(sem_id releaseSem, sem_id id)
44{
45	return _kern_switch_sem(releaseSem, id);
46}
47
48
49status_t
50switch_sem_etc(sem_id releaseSem, sem_id id, int32 count, uint32 flags, bigtime_t timeout)
51{
52	return _kern_switch_sem_etc(releaseSem, id, count, flags, timeout);
53}
54
55
56status_t
57release_sem(sem_id id)
58{
59	return _kern_release_sem(id);
60}
61
62
63status_t
64release_sem_etc(sem_id id, int32 count, uint32 flags)
65{
66	return _kern_release_sem_etc(id, count, flags);
67}
68
69
70status_t
71get_sem_count(sem_id sem, int32 *count)
72{
73	return _kern_get_sem_count(sem, count);
74}
75
76
77status_t
78set_sem_owner(sem_id sem, team_id team)
79{
80	return _kern_set_sem_owner(sem, team);
81}
82
83
84status_t
85_get_sem_info(sem_id sem, sem_info *info, size_t size)
86{
87	return _kern_get_sem_info(sem, info, size);
88}
89
90
91status_t
92_get_next_sem_info(team_id team, int32 *cookie, sem_info *info, size_t size)
93{
94	return _kern_get_next_sem_info(team, cookie, info, size);
95}
96
97