]> git.saurik.com Git - apple/xnu.git/blob - osfmk/mach/semaphore.defs
xnu-517.tar.gz
[apple/xnu.git] / osfmk / mach / semaphore.defs
1 /*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
7 *
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * file.
14 *
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
22 *
23 * @APPLE_LICENSE_HEADER_END@
24 */
25 /*
26 * @OSF_COPYRIGHT@
27 *
28 */
29 /*
30 * File: mach/semaphore.defs
31 * Author: Joseph CaraDonna
32 *
33 * Exported kernel calls
34 *
35 */
36
37 subsystem
38 #if KERNEL_SERVER
39 KernelServer
40 #endif /* KERNEL_SERVER */
41 semaphore 617200;
42
43 #include <mach/std_types.defs>
44 #include <mach/mach_types.defs>
45 #include <mach/clock_types.defs>
46
47 /*
48 * a semaphore_t is created and destroyed through the task object.
49 * semaphore_create(task_t,&semaphore_t,...);
50 * semaphore_destroy(task_t,semaphore_t);
51 */
52
53 routine semaphore_signal(
54 semaphore : semaphore_t);
55
56 routine semaphore_signal_all(
57 semaphore : semaphore_t);
58
59 routine semaphore_wait(
60 semaphore : semaphore_t);
61
62
63 routine semaphore_signal_thread(
64 semaphore : semaphore_t;
65 thread : thread_act_t);
66
67 routine semaphore_timedwait(
68 semaphore : semaphore_t;
69 wait_time : mach_timespec_t);
70
71 routine semaphore_wait_signal(
72 wait_semaphore : semaphore_t;
73 signal_semaphore: semaphore_t);
74
75 routine semaphore_timedwait_signal(
76 wait_semaphore : semaphore_t;
77 signal_semaphore: semaphore_t;
78 wait_time : mach_timespec_t);