Apache HTTPD
Classes | Typedefs | Functions
apr_reslist.c File Reference
#include <assert.h>
#include "apu.h"
#include "apr_reslist.h"
#include "apr_errno.h"
#include "apr_strings.h"
#include "apr_thread_mutex.h"
#include "apr_thread_cond.h"
#include "apr_ring.h"

Go to the source code of this file.

Classes

struct  apr_res_t
 
struct  apr_resring_t
 
struct  apr_reslist_t
 

Typedefs

typedef struct apr_res_t apr_res_t
 
typedef struct apr_resring_t apr_resring_t
 

Functions

static apr_res_tpop_resource (apr_reslist_t *reslist)
 
static void push_resource (apr_reslist_t *reslist, apr_res_t *resource)
 
static apr_res_tget_container (apr_reslist_t *reslist)
 
static void free_container (apr_reslist_t *reslist, apr_res_t *container)
 
static apr_status_t create_resource (apr_reslist_t *reslist, apr_res_t **ret_res)
 
static apr_status_t destroy_resource (apr_reslist_t *reslist, apr_res_t *res)
 
static apr_status_t reslist_cleanup (void *data_)
 
 APU_DECLARE (apr_status_t)
 
 APU_DECLARE (void)
 Computes SipHash-2-4, producing a 64bit (APR_SIPHASH_DSIZE) hash from a message and a 128bit (APR_SIPHASH_KSIZE) secret key, into a possibly unaligned buffer (using the little endian representation as defined by the authors for interoperabilty) usable as a MAC.
 
 APU_DECLARE (apr_uint32_t)
 

Typedef Documentation

◆ apr_res_t

Definition at line 35 of file apr_reslist.c.

◆ apr_resring_t

Definition at line 41 of file apr_reslist.c.

Function Documentation

◆ create_resource()

static apr_status_t create_resource ( apr_reslist_t reslist,
apr_res_t **  ret_res 
)
static

Create a new resource and return it. Assumes: that the reslist is locked.

Definition at line 118 of file apr_reslist.c.

◆ destroy_resource()

static apr_status_t destroy_resource ( apr_reslist_t reslist,
apr_res_t res 
)
static

Destroy a single idle resource. Assumes: that the reslist is locked.

Definition at line 135 of file apr_reslist.c.

◆ free_container()

static void free_container ( apr_reslist_t reslist,
apr_res_t container 
)
static

Free up a resource container by placing it on the free list.

Definition at line 109 of file apr_reslist.c.

◆ get_container()

static apr_res_t * get_container ( apr_reslist_t reslist)
static

Get an resource container from the free list or create a new one.

Definition at line 93 of file apr_reslist.c.

◆ pop_resource()

static apr_res_t * pop_resource ( apr_reslist_t reslist)
static

Grab a resource from the front of the resource list. Assumes: that the reslist is locked.

Definition at line 67 of file apr_reslist.c.

◆ push_resource()

static void push_resource ( apr_reslist_t reslist,
apr_res_t resource 
)
static

Add a resource to the beginning of the list, set the time at which it was added to the list. Assumes: that the reslist is locked.

Definition at line 81 of file apr_reslist.c.

◆ reslist_cleanup()

static apr_status_t reslist_cleanup ( void *  data_)
static

Definition at line 140 of file apr_reslist.c.