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@
27 * File: mach/semaphore.defs
28 * Author: Joseph CaraDonna
30 * Exported kernel calls
37 #endif /* KERNEL_SERVER */
40 #include <mach/std_types.defs>
41 #include <mach/mach_types.defs>
42 #include <mach/clock_types.defs>
45 * a semaphore_t is created and destroyed through the task object.
46 * semaphore_create(task_t,&semaphore_t,...);
47 * semaphore_destroy(task_t,semaphore_t);
50 routine semaphore_signal(
51 semaphore : semaphore_t);
53 routine semaphore_signal_all(
54 semaphore : semaphore_t);
56 routine semaphore_wait(
57 semaphore : semaphore_t);
60 routine semaphore_signal_thread(
61 semaphore : semaphore_t;
62 thread : thread_act_t);
64 routine semaphore_timedwait(
65 semaphore : semaphore_t;
66 wait_time : mach_timespec_t);
68 routine semaphore_wait_signal(
69 wait_semaphore : semaphore_t;
70 signal_semaphore: semaphore_t);
72 routine semaphore_timedwait_signal(
73 wait_semaphore : semaphore_t;
74 signal_semaphore: semaphore_t;
75 wait_time : mach_timespec_t);