2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
24 #include <mach/boolean.h>
25 #include <mach/message.h>
26 #include <mach/kern_return.h>
27 #include <mach/mach_traps.h>
28 #include <mach/mach_types.h>
29 #include <mach/clock_types.h>
31 kern_return_t
semaphore_signal(
32 mach_port_t signal_semaphore
)
34 return semaphore_signal_trap(signal_semaphore
);
37 kern_return_t
semaphore_signal_all(
38 mach_port_t signal_semaphore
)
40 return semaphore_signal_all_trap(signal_semaphore
);
43 kern_return_t
semaphore_signal_thread(
44 mach_port_t signal_semaphore
,
45 mach_port_t thread_act
)
47 return semaphore_signal_thread_trap(signal_semaphore
, thread_act
);
50 kern_return_t
semaphore_wait (
51 mach_port_t wait_semaphore
)
53 return semaphore_wait_trap(wait_semaphore
);
56 kern_return_t
semaphore_timedwait (
57 mach_port_t wait_semaphore
,
58 mach_timespec_t wait_time
)
60 return semaphore_timedwait_trap(wait_semaphore
,
65 kern_return_t
semaphore_wait_signal (
66 mach_port_t wait_semaphore
,
67 mach_port_t signal_semaphore
)
69 return semaphore_wait_signal_trap(wait_semaphore
, signal_semaphore
);
72 kern_return_t
semaphore_timedwait_signal (
73 mach_port_t wait_semaphore
,
74 mach_port_t signal_semaphore
,
75 mach_timespec_t wait_time
)
77 return semaphore_timedwait_signal_trap(wait_semaphore
,