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@
28 * File: mach/semaphore.defs
29 * Author: Joseph CaraDonna
31 * Exported kernel calls
38 #endif /* KERNEL_SERVER */
41 #include <mach/std_types.defs>
42 #include <mach/mach_types.defs>
43 #include <mach/clock_types.defs>
46 * a semaphore_t is created and destroyed through the task object.
47 * semaphore_create(task_t,&semaphore_t,...);
48 * semaphore_destroy(task_t,semaphore_t);
51 routine semaphore_signal(
52 semaphore : semaphore_t);
54 routine semaphore_signal_all(
55 semaphore : semaphore_t);
57 routine semaphore_wait(
58 semaphore : semaphore_t);
61 routine semaphore_signal_thread(
62 semaphore : semaphore_t;
63 thread : thread_act_t);
65 routine semaphore_timedwait(
66 semaphore : semaphore_t;
67 wait_time : mach_timespec_t);
69 routine semaphore_wait_signal(
70 wait_semaphore : semaphore_t;
71 signal_semaphore: semaphore_t);
73 routine semaphore_timedwait_signal(
74 wait_semaphore : semaphore_t;
75 signal_semaphore: semaphore_t;
76 wait_time : mach_timespec_t);