Print this page
OS-5223 removed shm segment is no longer available
Reviewed by: Bryan Cantrill <bryan@joyent.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>


   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.

  23  */
  24 
  25 #ifndef _IPC_IMPL_H
  26 #define _IPC_IMPL_H
  27 
  28 #include <sys/types.h>
  29 #include <sys/ipc.h>
  30 #include <sys/mutex.h>
  31 #include <sys/ipc_rctl.h>
  32 #include <sys/project.h>
  33 #include <sys/zone.h>
  34 #include <sys/sysmacros.h>
  35 #include <sys/avl.h>
  36 #include <sys/id_space.h>
  37 #include <sys/cred.h>
  38 #include <sys/list.h>
  39 
  40 #ifdef  __cplusplus
  41 extern "C" {
  42 #endif


 209 
 210 ipc_service_t *ipcs_create(const char *, rctl_hndl_t, rctl_hndl_t, size_t,
 211     ipc_func_t *, ipc_func_t *, int, size_t);
 212 void ipcs_destroy(ipc_service_t *);
 213 void ipcs_lock(ipc_service_t *);
 214 void ipcs_unlock(ipc_service_t *);
 215 
 216 kmutex_t *ipc_lock(ipc_service_t *, int);
 217 kmutex_t *ipc_relock(ipc_service_t *, int, kmutex_t *);
 218 kmutex_t *ipc_lookup(ipc_service_t *, int, kipc_perm_t **);
 219 
 220 void ipc_hold(ipc_service_t *, kipc_perm_t *);
 221 void ipc_rele(ipc_service_t *, kipc_perm_t *);
 222 void ipc_rele_locked(ipc_service_t *, kipc_perm_t *);
 223 
 224 int ipc_get(ipc_service_t *, key_t, int, kipc_perm_t **, kmutex_t **);
 225 int ipc_commit_begin(ipc_service_t *, key_t, int, kipc_perm_t *);
 226 kmutex_t *ipc_commit_end(ipc_service_t *, kipc_perm_t *);
 227 void ipc_cleanup(ipc_service_t *, kipc_perm_t *);
 228 

 229 int ipc_rmid(ipc_service_t *, int, cred_t *);
 230 int ipc_ids(ipc_service_t *, int *, uint_t, uint_t *);
 231 
 232 void ipc_remove_zone(ipc_service_t *, zoneid_t);
 233 
 234 #else   /* _KERNEL */
 235 
 236 int msgctl64(int, int, struct msqid_ds64 *);
 237 int semctl64(int, int, int, ...);
 238 int shmctl64(int, int, struct shmid_ds64 *);
 239 
 240 #endif  /* _KERNEL */
 241 
 242 
 243 #ifdef  __cplusplus
 244 }
 245 #endif
 246 
 247 #endif  /* _IPC_IMPL_H */


   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
  23  * Copyright 2016, Joyent, Inc.
  24  */
  25 
  26 #ifndef _IPC_IMPL_H
  27 #define _IPC_IMPL_H
  28 
  29 #include <sys/types.h>
  30 #include <sys/ipc.h>
  31 #include <sys/mutex.h>
  32 #include <sys/ipc_rctl.h>
  33 #include <sys/project.h>
  34 #include <sys/zone.h>
  35 #include <sys/sysmacros.h>
  36 #include <sys/avl.h>
  37 #include <sys/id_space.h>
  38 #include <sys/cred.h>
  39 #include <sys/list.h>
  40 
  41 #ifdef  __cplusplus
  42 extern "C" {
  43 #endif


 210 
 211 ipc_service_t *ipcs_create(const char *, rctl_hndl_t, rctl_hndl_t, size_t,
 212     ipc_func_t *, ipc_func_t *, int, size_t);
 213 void ipcs_destroy(ipc_service_t *);
 214 void ipcs_lock(ipc_service_t *);
 215 void ipcs_unlock(ipc_service_t *);
 216 
 217 kmutex_t *ipc_lock(ipc_service_t *, int);
 218 kmutex_t *ipc_relock(ipc_service_t *, int, kmutex_t *);
 219 kmutex_t *ipc_lookup(ipc_service_t *, int, kipc_perm_t **);
 220 
 221 void ipc_hold(ipc_service_t *, kipc_perm_t *);
 222 void ipc_rele(ipc_service_t *, kipc_perm_t *);
 223 void ipc_rele_locked(ipc_service_t *, kipc_perm_t *);
 224 
 225 int ipc_get(ipc_service_t *, key_t, int, kipc_perm_t **, kmutex_t **);
 226 int ipc_commit_begin(ipc_service_t *, key_t, int, kipc_perm_t *);
 227 kmutex_t *ipc_commit_end(ipc_service_t *, kipc_perm_t *);
 228 void ipc_cleanup(ipc_service_t *, kipc_perm_t *);
 229 
 230 void ipc_rmsvc(ipc_service_t *, kipc_perm_t *);
 231 int ipc_rmid(ipc_service_t *, int, cred_t *);
 232 int ipc_ids(ipc_service_t *, int *, uint_t, uint_t *);
 233 
 234 void ipc_remove_zone(ipc_service_t *, zoneid_t);
 235 
 236 #else   /* _KERNEL */
 237 
 238 int msgctl64(int, int, struct msqid_ds64 *);
 239 int semctl64(int, int, int, ...);
 240 int shmctl64(int, int, struct shmid_ds64 *);
 241 
 242 #endif  /* _KERNEL */
 243 
 244 
 245 #ifdef  __cplusplus
 246 }
 247 #endif
 248 
 249 #endif  /* _IPC_IMPL_H */