]>
git.saurik.com Git - apple/xnu.git/blob - bsd/sys/posix_sem.h
3 * Copyright (c) 1999-2003 Apple Computer, Inc. All rights reserved.
5 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
7 * This file contains Original Code and/or Modifications of Original Code
8 * as defined in and that are subject to the Apple Public Source License
9 * Version 2.0 (the 'License'). You may not use this file except in
10 * compliance with the License. The rights granted to you under the License
11 * may not be used to create, or enable the creation or redistribution of,
12 * unlawful or unlicensed copies of an Apple operating system, or to
13 * circumvent, violate, or enable the circumvention or violation of, any
14 * terms of an Apple operating system software license agreement.
16 * Please obtain a copy of the License at
17 * http://www.opensource.apple.com/apsl/ and read it before using this file.
19 * The Original Code and all software distributed under the License are
20 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
21 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
22 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
23 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
24 * Please see the License for the specific language governing rights and
25 * limitations under the License.
27 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
30 * Copyright (c) 1990, 1996-1998 Apple Computer, Inc.
31 * All Rights Reserved.
34 * posix_shm.c : Support for POSIX semaphore APIs
37 * Author: Ananthakrishna Ramesh
45 #ifndef _SYS_POSIX_SEM_H_
46 #define _SYS_POSIX_SEM_H_
48 #include <sys/appleapiopts.h>
49 #include <sys/types.h>
54 #define PSEMNAMLEN 31 /* maximum name segment length we bother with */
57 unsigned int psem_flags
;
58 unsigned int psem_usecount
;
62 char psem_name
[PSEMNAMLEN
+ 1]; /* segment name */
63 void * psem_semobject
;
64 struct proc
* sem_proc
;
65 struct label
* psem_label
;
68 #define PSEMINFO_NULL (struct pseminfo *)0
71 #define PSEM_DEFINED 2
72 #define PSEM_ALLOCATED 4
74 #define PSEM_INUSE 0x10
75 #define PSEM_REMOVED 0x20
76 #define PSEM_INCREATE 0x40
77 #define PSEM_INDELETE 0x80