thread.c File Reference

#include "memcached.h"
#include <assert.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <pthread.h>

Include dependency graph for thread.c:


Classes

struct  conn_queue_item
struct  conn_queue

Defines

#define ITEMS_PER_ALLOC   64

Typedefs

typedef struct conn_queue_item CQ_ITEM
typedef struct conn_queue CQ

Functions

void accept_new_conns (const bool do_accept)
void dispatch_conn_new (int sfd, enum conn_states init_state, int event_flags, int read_buffer_size, enum protocol prot)
int is_listen_thread ()
itemitem_alloc (char *key, size_t nkey, int flags, rel_time_t exptime, int nbytes)
itemitem_get (const char *key, const size_t nkey)
int item_link (item *item)
void item_remove (item *item)
int item_replace (item *old_it, item *new_it)
void item_unlink (item *item)
void item_update (item *item)
char * add_delta (conn *c, item *item, int incr, const int64_t delta, char *buf)
enum store_item_type store_item (item *item, int comm, conn *c)
void item_flush_expired ()
char * item_cachedump (unsigned int slabs_clsid, unsigned int limit, unsigned int *bytes)
void item_stats (ADD_STAT add_stats, void *c)
void item_stats_sizes (ADD_STAT add_stats, void *c)
void STATS_LOCK ()
void STATS_UNLOCK ()
void threadlocal_stats_reset (void)
void threadlocal_stats_aggregate (struct thread_stats *stats)
void slab_stats_aggregate (struct thread_stats *stats, struct slab_stats *out)
void thread_init (int nthreads, struct event_base *main_base)

Variables

pthread_mutex_t cache_lock
pthread_mutex_t conn_lock = PTHREAD_MUTEX_INITIALIZER

Define Documentation

#define ITEMS_PER_ALLOC   64


Typedef Documentation

typedef struct conn_queue CQ

typedef struct conn_queue_item CQ_ITEM


Function Documentation

void accept_new_conns ( const bool  do_accept  ) 

Here is the call graph for this function:

char* add_delta ( conn c,
item item,
int  incr,
const int64_t  delta,
char *  buf 
)

Here is the call graph for this function:

void dispatch_conn_new ( int  sfd,
enum conn_states  init_state,
int  event_flags,
int  read_buffer_size,
enum protocol  prot 
)

int is_listen_thread ( void   ) 

item* item_alloc ( char *  key,
size_t  nkey,
int  flags,
rel_time_t  exptime,
int  nbytes 
)

Here is the call graph for this function:

char* item_cachedump ( unsigned int  slabs_clsid,
unsigned int  limit,
unsigned int *  bytes 
)

Here is the call graph for this function:

void item_flush_expired ( void   ) 

Here is the call graph for this function:

item* item_get ( const char *  key,
const size_t  nkey 
)

Here is the call graph for this function:

int item_link ( item item  ) 

Here is the call graph for this function:

void item_remove ( item item  ) 

Here is the call graph for this function:

int item_replace ( item old_it,
item new_it 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void item_stats ( ADD_STAT  add_stats,
void *  c 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void item_stats_sizes ( ADD_STAT  add_stats,
void *  c 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void item_unlink ( item item  ) 

Here is the call graph for this function:

void item_update ( item item  ) 

Here is the call graph for this function:

void slab_stats_aggregate ( struct thread_stats stats,
struct slab_stats out 
)

void STATS_LOCK ( void   ) 

Here is the caller graph for this function:

void STATS_UNLOCK ( void   ) 

Here is the caller graph for this function:

enum store_item_type store_item ( item item,
int  comm,
conn c 
)

Here is the call graph for this function:

void thread_init ( int  nthreads,
struct event_base *  main_base 
)

Here is the caller graph for this function:

void threadlocal_stats_aggregate ( struct thread_stats stats  ) 

void threadlocal_stats_reset ( void   ) 


Variable Documentation

pthread_mutex_t cache_lock

pthread_mutex_t conn_lock = PTHREAD_MUTEX_INITIALIZER


Generated on Fri Apr 17 16:28:29 2009 for memcached by  doxygen 1.5.8