2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
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
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.
23 * @APPLE_LICENSE_HEADER_END@
30 * File: mach/semaphore.defs
31 * Author: Joseph CaraDonna
33 * Exported kernel calls
40 #endif /* KERNEL_SERVER */
43 #include <mach/std_types.defs>
44 #include <mach/mach_types.defs>
45 #include <mach/clock_types.defs>
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);
53 routine semaphore_signal(
54 semaphore : semaphore_t);
56 routine semaphore_signal_all(
57 semaphore : semaphore_t);
59 routine semaphore_wait(
60 semaphore : semaphore_t);
63 routine semaphore_signal_thread(
64 semaphore : semaphore_t;
65 thread : thread_act_t);
67 routine semaphore_timedwait(
68 semaphore : semaphore_t;
69 wait_time : mach_timespec_t);
71 routine semaphore_wait_signal(
72 wait_semaphore : semaphore_t;
73 signal_semaphore: semaphore_t);
75 routine semaphore_timedwait_signal(
76 wait_semaphore : semaphore_t;
77 signal_semaphore: semaphore_t;
78 wait_time : mach_timespec_t);