]> git.saurik.com Git - apple/libc.git/blame - mach/semaphore.c
Libc-391.4.3.tar.gz
[apple/libc.git] / mach / semaphore.c
CommitLineData
e9ce8d39
A
1/*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
734aad71
A
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
11 * file.
12 *
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
e9ce8d39
A
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
734aad71
A
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.
e9ce8d39
A
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
e9ce8d39
A
23
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>
30
e9ce8d39
A
31kern_return_t semaphore_signal(
32 mach_port_t signal_semaphore)
33{
34 return semaphore_signal_trap(signal_semaphore);
35}
36
37kern_return_t semaphore_signal_all(
38 mach_port_t signal_semaphore)
39{
40 return semaphore_signal_all_trap(signal_semaphore);
41}
42
43kern_return_t semaphore_signal_thread(
44 mach_port_t signal_semaphore,
45 mach_port_t thread_act)
46{
47 return semaphore_signal_thread_trap(signal_semaphore, thread_act);
48}
49
50kern_return_t semaphore_wait (
51 mach_port_t wait_semaphore)
52{
53 return semaphore_wait_trap(wait_semaphore);
54}
55
56kern_return_t semaphore_timedwait (
57 mach_port_t wait_semaphore,
58 mach_timespec_t wait_time)
59{
60 return semaphore_timedwait_trap(wait_semaphore,
61 wait_time.tv_sec,
62 wait_time.tv_nsec);
63}
64
65kern_return_t semaphore_wait_signal (
66 mach_port_t wait_semaphore,
67 mach_port_t signal_semaphore)
68{
69 return semaphore_wait_signal_trap(wait_semaphore, signal_semaphore);
70}
71
72kern_return_t semaphore_timedwait_signal (
73 mach_port_t wait_semaphore,
74 mach_port_t signal_semaphore,
75 mach_timespec_t wait_time)
76{
77 return semaphore_timedwait_signal_trap(wait_semaphore,
78 signal_semaphore,
79 wait_time.tv_sec,
80 wait_time.tv_nsec);
81}