2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
23 * catch_exception_raise will be implemented by user programs
24 * This implementation is provided to resolve the reference in
28 #include <mach/boolean.h>
29 #include <mach/message.h>
30 #include <mach/kern_return.h>
31 #include <mach/mach_traps.h>
32 #include <mach/mach_types.h>
33 #include <mach/clock_types.h>
35 extern kern_return_t _host_semaphore_traps_return_
;
37 kern_return_t
semaphore_signal(
38 mach_port_t signal_semaphore
)
40 return semaphore_signal_trap(signal_semaphore
);
43 kern_return_t
semaphore_signal_all(
44 mach_port_t signal_semaphore
)
46 return semaphore_signal_all_trap(signal_semaphore
);
49 kern_return_t
semaphore_signal_thread(
50 mach_port_t signal_semaphore
,
51 mach_port_t thread_act
)
53 return semaphore_signal_thread_trap(signal_semaphore
, thread_act
);
56 kern_return_t
semaphore_wait (
57 mach_port_t wait_semaphore
)
59 return semaphore_wait_trap(wait_semaphore
);
62 kern_return_t
semaphore_timedwait (
63 mach_port_t wait_semaphore
,
64 mach_timespec_t wait_time
)
66 return semaphore_timedwait_trap(wait_semaphore
,
71 kern_return_t
semaphore_wait_signal (
72 mach_port_t wait_semaphore
,
73 mach_port_t signal_semaphore
)
75 return semaphore_wait_signal_trap(wait_semaphore
, signal_semaphore
);
78 kern_return_t
semaphore_timedwait_signal (
79 mach_port_t wait_semaphore
,
80 mach_port_t signal_semaphore
,
81 mach_timespec_t wait_time
)
83 return semaphore_timedwait_signal_trap(wait_semaphore
,