842ae4bd224140319ae7feec1872b93dfd491143fielding/* Licensed to the Apache Software Foundation (ASF) under one or more
842ae4bd224140319ae7feec1872b93dfd491143fielding * contributor license agreements. See the NOTICE file distributed with
842ae4bd224140319ae7feec1872b93dfd491143fielding * this work for additional information regarding copyright ownership.
842ae4bd224140319ae7feec1872b93dfd491143fielding * The ASF licenses this file to You under the Apache License, Version 2.0
842ae4bd224140319ae7feec1872b93dfd491143fielding * (the "License"); you may not use this file except in compliance with
842ae4bd224140319ae7feec1872b93dfd491143fielding * the License. You may obtain a copy of the License at
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * Unless required by applicable law or agreed to in writing, software
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * distributed under the License is distributed on an "AS IS" BASIS,
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * See the License for the specific language governing permissions and
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * limitations under the License.
9d129b55f5a43abf43865c6b0eb6dd19bc22aba8ianh/* Memory handler for a shared memory divided in slot.
9d129b55f5a43abf43865c6b0eb6dd19bc22aba8ianh * @brief Memory Slot Extension Storage Module for Apache
9d129b55f5a43abf43865c6b0eb6dd19bc22aba8ianh * @defgroup MEM mem
9d129b55f5a43abf43865c6b0eb6dd19bc22aba8ianh * @ingroup APACHE_MODS
cc003103e52ff9d5fe9bed567ef9438613ab4fbfrseextern "C" {
cc003103e52ff9d5fe9bed567ef9438613ab4fbfrse * Values for ap_slotmem_type_t::
726be39314e1b2ede8378630efccce4cdeb88a31dougm * AP_SLOTMEM_TYPE_PERSIST: For transitory providers, persist
cc003103e52ff9d5fe9bed567ef9438613ab4fbfrse * the data on the file-system
60998c490ad3334eb07ae63b23b479ac564dec94kbrand * AP_SLOTMEM_TYPE_NOTMPSAFE:
cc003103e52ff9d5fe9bed567ef9438613ab4fbfrse * AP_SLOTMEM_TYPE_PREALLOC: Access to slots require they be grabbed 1st
1b1621900bd89ddc496d721c865a726f635ebd7esf * AP_SLOTMEM_TYPE_CLEARINUSE: If persisting, clear 'inuse' array before
bdec92dd2c27b079aebb91250204febb4c59d7eadougmtypedef struct ap_slotmem_instance_t ap_slotmem_instance_t;
9d129b55f5a43abf43865c6b0eb6dd19bc22aba8ianh * callback function used for slotmem doall.
9d129b55f5a43abf43865c6b0eb6dd19bc22aba8ianh * @param mem is the memory associated with a worker.
apr_status_t (* doall)(ap_slotmem_instance_t *s, ap_slotmem_callback_fn_t *func, void *data, apr_pool_t *pool);
* @param name a key used for debugging and in mod_status output or allow another process to share this space.
apr_status_t (* create)(ap_slotmem_instance_t **inst, const char *name, apr_size_t item_size, unsigned int item_num, ap_slotmem_type_t type, apr_pool_t *pool);
* @param name a key used for debugging and in mod_status output or allow another process to share this space.
apr_status_t (* attach)(ap_slotmem_instance_t **inst, const char *name, apr_size_t *item_size, unsigned int *item_num, apr_pool_t *pool);
apr_status_t (* get)(ap_slotmem_instance_t *s, unsigned int item_id, unsigned char *dest, apr_size_t dest_len);
apr_status_t (* put)(ap_slotmem_instance_t *slot, unsigned int item_id, unsigned char *src, apr_size_t src_len);
#ifdef __cplusplus