#include <ap_slotmem.h>
|
const char * | name |
|
apr_status_t(* | doall )(ap_slotmem_instance_t *s, ap_slotmem_callback_fn_t *func, void *data, apr_pool_t *pool) |
|
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) |
|
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(* | dptr )(ap_slotmem_instance_t *s, unsigned int item_id, void **mem) |
|
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) |
|
unsigned int(* | num_slots )(ap_slotmem_instance_t *s) |
|
unsigned int(* | num_free_slots )(ap_slotmem_instance_t *s) |
|
apr_size_t(* | slot_size )(ap_slotmem_instance_t *s) |
|
apr_status_t(* | grab )(ap_slotmem_instance_t *s, unsigned int *item_id) |
|
apr_status_t(* | release )(ap_slotmem_instance_t *s, unsigned int item_id) |
|
apr_status_t(* | fgrab )(ap_slotmem_instance_t *s, unsigned int item_id) |
|
◆ attach
attach to an existing slotmem. This would attach to shared memory, basically.
- Parameters
-
inst | where to store pointer to slotmem |
name | a key used for debugging and in mod_status output or allow another process to share this space. |
item_size | size of each item |
item_num | max number of item. |
pool | is pool to memory allocate. |
- Returns
- APR_SUCCESS if all went well
◆ create
create a new slotmem with each item size is item_size. This would create shared memory, basically.
- Parameters
-
inst | where to store pointer to slotmem |
name | a key used for debugging and in mod_status output or allow another process to share this space. |
item_size | size of each item |
item_num | number of item to create. |
type | type of slotmem. |
pool | is pool used |
- Returns
- APR_SUCCESS if all went well
◆ doall
call the callback on all worker slots
- Parameters
-
s | ap_slotmem_instance_t to use. |
funct | callback function to call for each element. |
data | parameter for the callback function. |
pool | is pool used |
- Returns
- APR_SUCCESS if all went well
◆ dptr
get the memory ptr associated with this worker slot.
- Parameters
-
s | ap_slotmem_instance_t to use. |
item_id | item to return for 0 to item_num |
mem | address to store the pointer to the slot |
- Returns
- APR_SUCCESS if all went well
◆ fgrab
forced grab (or alloc) a slot associated with this item_id
- Parameters
-
s | ap_slotmem_instance_t to use. |
item_id | to the specified slot id and marked as in-use |
- Returns
- APR_SUCCESS if all went well
◆ get
get/read the data associated with this worker slot.
- Parameters
-
s | ap_slotmem_instance_t to use. |
item_id | item to return for 0 to item_num |
dest | address to store the data |
dest_len | length of dataset to retrieve |
- Returns
- APR_SUCCESS if all went well
◆ grab
grab (or alloc) a free slot
- Parameters
-
s | ap_slotmem_instance_t to use. |
item_id | ptr to the available slot id and marked as in-use |
- Returns
- APR_SUCCESS if all went well
◆ name
const char* ap_slotmem_provider_t::name |
◆ num_free_slots
return number of free (not used) slots allocated for this entry. Valid for slots which are AP_SLOTMEM_TYPE_PREGRAB as well as any which use get/release.
- Parameters
-
s | ap_slotmem_instance_t to use. |
- Returns
- number of slots
◆ num_slots
return number of slots allocated for this entry.
- Parameters
-
s | ap_slotmem_instance_t to use. |
- Returns
- number of slots
◆ put
put/write the data associated with this worker slot.
- Parameters
-
s | ap_slotmem_instance_t to use. |
item_id | item to return for 0 to item_num |
src | address of the data to store in the slot |
src_len | length of dataset to store in the slot |
- Returns
- APR_SUCCESS if all went well
◆ release
release (or free) the slot associated with this item_id
- Parameters
-
s | ap_slotmem_instance_t to use. |
item_id | slot id to free and mark as no longer in-use |
- Returns
- APR_SUCCESS if all went well
◆ slot_size
return slot size allocated for this entry.
- Parameters
-
s | ap_slotmem_instance_t to use. |
- Returns
- size of slot
The documentation for this struct was generated from the following file: