Typedefs | Functions
http_memory.h File Reference

Global server memory. More...

Typedefs

typedef struct vtm_http_mem vtm_http_mem
 

Functions

VTM_API void vtm_http_mem_put (vtm_http_mem *mem, const char *key, void *val)
 
VTM_API void * vtm_http_mem_get (vtm_http_mem *mem, const char *key)
 
VTM_API void vtm_http_mem_lock (vtm_http_mem *mem, const char *key)
 
VTM_API void vtm_http_mem_unlock (vtm_http_mem *mem, const char *key)
 

Function Documentation

VTM_API void vtm_http_mem_put ( vtm_http_mem *  mem,
const char *  key,
void *  val 
)

Stores a single value in the memory.

Parameters
memthe global memory
keythe key under which the value is stored
valthe value that is stored
VTM_API void* vtm_http_mem_get ( vtm_http_mem *  mem,
const char *  key 
)

Retrieves a stored value from the memory.

Parameters
memthe global memory
keythe key for the value that should be retrieved
VTM_API void vtm_http_mem_lock ( vtm_http_mem *  mem,
const char *  key 
)

Acquire global lock for given key.

This call may block until the lock can be acquired.

Parameters
memthe global memory
keythe key that should be locked
VTM_API void vtm_http_mem_unlock ( vtm_http_mem *  mem,
const char *  key 
)

Unlock given key.

Parameters
memthe global memory
keythe key that should be unlocked