]>
Commit | Line | Data |
---|---|---|
1c79356b A |
1 | /* |
2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
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. | |
11 | * | |
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 | |
18 | * under the License. | |
19 | * | |
20 | * @APPLE_LICENSE_HEADER_END@ | |
21 | */ | |
22 | /* | |
23 | * @OSF_COPYRIGHT@ | |
24 | * | |
25 | */ | |
26 | /* | |
27 | * File: mach/semaphore.defs | |
28 | * Author: Joseph CaraDonna | |
29 | * | |
30 | * Exported kernel calls | |
31 | * | |
32 | */ | |
33 | ||
34 | subsystem | |
35 | #if KERNEL_SERVER | |
36 | KernelServer | |
37 | #endif /* KERNEL_SERVER */ | |
38 | semaphore 617200; | |
39 | ||
40 | #include <mach/std_types.defs> | |
41 | #include <mach/mach_types.defs> | |
42 | #include <mach/clock_types.defs> | |
43 | ||
44 | /* | |
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); | |
48 | */ | |
49 | ||
50 | routine semaphore_signal( | |
51 | semaphore : semaphore_t); | |
52 | ||
53 | routine semaphore_signal_all( | |
54 | semaphore : semaphore_t); | |
55 | ||
56 | routine semaphore_wait( | |
57 | semaphore : semaphore_t); | |
58 | ||
59 | ||
60 | routine semaphore_signal_thread( | |
61 | semaphore : semaphore_t; | |
62 | thread : thread_act_t); | |
63 | ||
64 | routine semaphore_timedwait( | |
65 | semaphore : semaphore_t; | |
66 | wait_time : mach_timespec_t); | |
67 | ||
68 | routine semaphore_wait_signal( | |
69 | wait_semaphore : semaphore_t; | |
70 | signal_semaphore: semaphore_t); | |
71 | ||
72 | routine semaphore_timedwait_signal( | |
73 | wait_semaphore : semaphore_t; | |
74 | signal_semaphore: semaphore_t; | |
75 | wait_time : mach_timespec_t); |