CUBRID Engine  latest
shard_proxy_queue.h File Reference
#include <pthread.h>
Include dependency graph for shard_proxy_queue.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  t_shard_queue_ent
 
struct  t_shard_queue
 
struct  t_shard_cqueue
 

Typedefs

typedef int(* SHARD_COMP_FN) (const void *arg1, const void *arg2)
 
typedef struct t_shard_queue_ent T_SHARD_QUEUE_ENT
 
typedef struct t_shard_queue T_SHARD_QUEUE
 
typedef struct t_shard_cqueue T_SHARD_CQUEUE
 

Functions

int shard_queue_enqueue (T_SHARD_QUEUE *q, void *v)
 
int shard_queue_ordered_enqueue (T_SHARD_QUEUE *q, void *v, SHARD_COMP_FN comp_fn)
 
void * shard_queue_dequeue (T_SHARD_QUEUE *q)
 
void * shard_queue_peek_value (T_SHARD_QUEUE *q)
 
int shard_queue_initialize (T_SHARD_QUEUE *q)
 
void shard_queue_destroy (T_SHARD_QUEUE *q)
 
int shard_cqueue_enqueue (T_SHARD_CQUEUE *cq, void *e)
 
void * shard_cqueue_dequeue (T_SHARD_CQUEUE *cq)
 
int shard_cqueue_initialize (T_SHARD_CQUEUE *cq, int size)
 
void shard_cqueue_destroy (T_SHARD_CQUEUE *cq)
 

Typedef Documentation

typedef int(* SHARD_COMP_FN) (const void *arg1, const void *arg2)

Definition at line 34 of file shard_proxy_queue.h.

Definition at line 54 of file shard_proxy_queue.h.

typedef struct t_shard_queue T_SHARD_QUEUE

Definition at line 44 of file shard_proxy_queue.h.

Definition at line 36 of file shard_proxy_queue.h.

Function Documentation

void* shard_cqueue_dequeue ( T_SHARD_CQUEUE cq)

Definition at line 242 of file shard_proxy_queue.c.

References assert, t_shard_cqueue::count, t_shard_cqueue::ent, NULL, t_shard_cqueue::rear, shard_cqueue_is_empty(), and t_shard_cqueue::size.

Referenced by proxy_client_io_new(), and proxy_context_new().

Here is the caller graph for this function:

void shard_cqueue_destroy ( T_SHARD_CQUEUE cq)

Definition at line 289 of file shard_proxy_queue.c.

References t_shard_cqueue::count, t_shard_cqueue::ent, FREE_MEM, t_shard_cqueue::front, t_shard_cqueue::rear, and t_shard_cqueue::size.

Referenced by proxy_client_io_destroy(), and proxy_context_destroy().

Here is the caller graph for this function:

int shard_cqueue_enqueue ( T_SHARD_CQUEUE cq,
void *  e 
)
int shard_cqueue_initialize ( T_SHARD_CQUEUE cq,
int  size 
)
void shard_queue_destroy ( T_SHARD_QUEUE q)

Definition at line 188 of file shard_proxy_queue.c.

References FREE_MEM, t_shard_queue::head, NULL, shard_queue_dequeue(), and t_shard_queue::tail.

Referenced by proxy_handler_destroy(), proxy_shard_io_destroy(), shard_stmt_destroy(), and shard_stmt_free().

Here is the caller graph for this function:

int shard_queue_initialize ( T_SHARD_QUEUE q)

Definition at line 177 of file shard_proxy_queue.c.

References assert, t_shard_queue::head, NULL, and t_shard_queue::tail.

Referenced by proxy_handler_initialize(), proxy_shard_io_initialize(), and shard_stmt_new_internal().

Here is the caller graph for this function:

int shard_queue_ordered_enqueue ( T_SHARD_QUEUE q,
void *  v,
SHARD_COMP_FN  comp_fn 
)
void* shard_queue_peek_value ( T_SHARD_QUEUE q)

Definition at line 160 of file shard_proxy_queue.c.

References t_shard_queue::head, NULL, and t_shard_queue_ent::v.

Referenced by proxy_available_cas_wait_timer(), and proxy_waiter_timeout().

Here is the caller graph for this function: