1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright 2003 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 * Copyright 2025 MNX Cloud, Inc. 26 */ 27 28 #ifndef _POS4OBJ_H 29 #define _POS4OBJ_H 30 31 /* 32 * pos4obj.h - Header file for POSIX.4 related object names 33 */ 34 35 #ifdef __cplusplus 36 extern "C" { 37 #endif 38 39 /* flags used to indicate current state of open */ 40 #define DFILE_CREATE 0x01 41 #define DFILE_OPEN 0x02 42 /* ALLOC_MEM 0x4 is deprecated, reuse this first */ 43 #define DFILE_MMAP 0x08 44 #define PFILE_CREATE 0x10 45 #define NFILE_CREATE 0x20 46 #define MQDNP_MMAP 0x40 47 48 /* semaphore object types - used in constructing file name */ 49 #define SEM_DATA_TYPE ".SEMD" 50 #define SEM_LOCK_TYPE ".SEML" 51 52 /* message queue object types - used in constructing file name */ 53 #define MQ_DATA_TYPE ".MQD" 54 #define MQ_PERM_TYPE ".MQP" 55 #define MQ_DSCN_TYPE ".MQN" 56 #define MQ_LOCK_TYPE ".MQL" 57 58 /* shared memory object types - used in constructing file name */ 59 #define SHM_DATA_TYPE ".SHMD" 60 #define SHM_LOCK_TYPE ".SHML" 61 62 /* functions defined related to object names in POSIX.4 */ 63 extern int __pos4obj_lock(const char *, const char *); 64 extern int __pos4obj_unlock(const char *, const char *); 65 extern int __pos4obj_unlink(const char *, const char *); 66 extern int __pos4obj_open(const char *, char *, int, mode_t, int *); 67 extern int __pos4obj_check(const char *); 68 69 /* non-cancelable file operations */ 70 int __open_nc(const char *, int, mode_t); 71 int __close_nc(int); 72 73 #ifdef __cplusplus 74 } 75 #endif 76 77 #endif /* _POS4OBJ_H */ 78