CUBRID Engine  latest
shard_proxy_queue.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "cas_common.h"
#include "shard_proxy_common.h"
#include "shard_proxy_queue.h"
Include dependency graph for shard_proxy_queue.c:

Go to the source code of this file.

Functions

static void shard_queue_insert_after (T_SHARD_QUEUE *q, T_SHARD_QUEUE_ENT *prev, T_SHARD_QUEUE_ENT *curr)
 
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)
 
static bool shard_cqueue_is_full (T_SHARD_CQUEUE *q)
 
static bool shard_cqueue_is_empty (T_SHARD_CQUEUE *q)
 
int shard_cqueue_enqueue (T_SHARD_CQUEUE *q, void *e)
 
void * shard_cqueue_dequeue (T_SHARD_CQUEUE *q)
 
int shard_cqueue_initialize (T_SHARD_CQUEUE *q, int size)
 
void shard_cqueue_destroy (T_SHARD_CQUEUE *q)
 

Function Documentation

void* shard_cqueue_dequeue ( T_SHARD_CQUEUE q)

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 q)

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 q,
void *  e 
)
int shard_cqueue_initialize ( T_SHARD_CQUEUE q,
int  size 
)
static bool shard_cqueue_is_empty ( T_SHARD_CQUEUE q)
static

Definition at line 212 of file shard_proxy_queue.c.

References assert, and t_shard_cqueue::count.

Referenced by shard_cqueue_dequeue().

Here is the caller graph for this function:

static bool shard_cqueue_is_full ( T_SHARD_CQUEUE q)
static

Definition at line 204 of file shard_proxy_queue.c.

References assert, t_shard_cqueue::count, and t_shard_cqueue::size.

Referenced by shard_cqueue_enqueue().

Here is the caller graph for this function:

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:

static void shard_queue_insert_after ( T_SHARD_QUEUE q,
T_SHARD_QUEUE_ENT prev,
T_SHARD_QUEUE_ENT curr 
)
static

Definition at line 38 of file shard_proxy_queue.c.

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

Referenced by shard_queue_enqueue(), and shard_queue_ordered_enqueue().

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: