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