00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef SHM_H
00018 #define SHM_H
00019
00020 #include "apr.h"
00021 #include "apr_private.h"
00022 #include "apr_general.h"
00023 #include "apr_lib.h"
00024 #include "apr_shm.h"
00025 #include "apr_pools.h"
00026 #include "apr_file_io.h"
00027 #include "apr_network_io.h"
00028 #include "apr_portable.h"
00029
00030 #ifdef HAVE_SYS_MMAN_H
00031 #include <sys/mman.h>
00032 #endif
00033 #ifdef HAVE_SYS_IPC_H
00034 #include <sys/ipc.h>
00035 #endif
00036 #ifdef HAVE_SYS_MUTEX_H
00037 #include <sys/mutex.h>
00038 #endif
00039 #ifdef HAVE_SYS_SHM_H
00040 #include <sys/shm.h>
00041 #endif
00042 #if !defined(SHM_R)
00043 #define SHM_R 0400
00044 #endif
00045 #if !defined(SHM_W)
00046 #define SHM_W 0200
00047 #endif
00048 #ifdef HAVE_SYS_FILE_H
00049 #include <sys/file.h>
00050 #endif
00051
00052
00053
00054 #ifndef MAP_FAILED
00055 #define MAP_FAILED ((void *)-1)
00056 #endif
00057
00058 struct apr_shm_t {
00059 apr_pool_t *pool;
00060 void *base;
00061 void *usable;
00062 apr_size_t reqsize;
00063 apr_size_t realsize;
00064 const char *filename;
00065 #if APR_USE_SHMEM_SHMGET || APR_USE_SHMEM_SHMGET_ANON
00066 int shmid;
00067 #endif
00068 };
00069
00070 #endif