00001 /* Copyright 2000-2004 The Apache Software Foundation 00002 * 00003 * Licensed under the Apache License, Version 2.0 (the "License"); 00004 * you may not use this file except in compliance with the License. 00005 * You may obtain a copy of the License at 00006 * 00007 * http://www.apache.org/licenses/LICENSE-2.0 00008 * 00009 * Unless required by applicable law or agreed to in writing, software 00010 * distributed under the License is distributed on an "AS IS" BASIS, 00011 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00012 * See the License for the specific language governing permissions and 00013 * limitations under the License. 00014 */ 00015 00016 #ifndef APR_SHM_H 00017 #define APR_SHM_H 00018 00024 #include "apr.h" 00025 #include "apr_pools.h" 00026 #include "apr_errno.h" 00027 00028 #ifdef __cplusplus 00029 extern "C" { 00030 #endif /* __cplusplus */ 00031 00042 typedef struct apr_shm_t apr_shm_t; 00043 00067 APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m, 00068 apr_size_t reqsize, 00069 const char *filename, 00070 apr_pool_t *pool); 00071 00076 APR_DECLARE(apr_status_t) apr_shm_destroy(apr_shm_t *m); 00077 00087 APR_DECLARE(apr_status_t) apr_shm_attach(apr_shm_t **m, 00088 const char *filename, 00089 apr_pool_t *pool); 00090 00096 APR_DECLARE(apr_status_t) apr_shm_detach(apr_shm_t *m); 00097 00106 APR_DECLARE(void *) apr_shm_baseaddr_get(const apr_shm_t *m); 00107 00113 APR_DECLARE(apr_size_t) apr_shm_size_get(const apr_shm_t *m); 00114 00118 APR_POOL_DECLARE_ACCESSOR(shm); 00119 00122 #ifdef __cplusplus 00123 } 00124 #endif 00125 00126 #endif /* APR_SHM_T */