CUBRID Engine
latest
|
#include <pthread.h>
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) |
Definition at line 34 of file shard_proxy_queue.h.
typedef struct t_shard_cqueue T_SHARD_CQUEUE |
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.
typedef struct t_shard_queue_ent T_SHARD_QUEUE_ENT |
Definition at line 36 of file shard_proxy_queue.h.
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().
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().
int shard_cqueue_enqueue | ( | T_SHARD_CQUEUE * | cq, |
void * | e | ||
) |
Definition at line 221 of file shard_proxy_queue.c.
References assert, t_shard_cqueue::count, t_shard_cqueue::ent, t_shard_cqueue::front, PROXY_LOG, PROXY_LOG_MODE_ERROR, shard_cqueue_is_full(), and t_shard_cqueue::size.
Referenced by proxy_client_io_free(), proxy_client_io_initialize(), proxy_context_free(), and proxy_context_initialize().
int shard_cqueue_initialize | ( | T_SHARD_CQUEUE * | cq, |
int | size | ||
) |
Definition at line 263 of file shard_proxy_queue.c.
References assert, t_shard_cqueue::count, t_shard_cqueue::ent, t_shard_cqueue::front, NULL, PROXY_LOG, PROXY_LOG_MODE_ERROR, t_shard_cqueue::rear, and t_shard_cqueue::size.
Referenced by proxy_client_io_initialize(), and proxy_context_initialize().
void* shard_queue_dequeue | ( | T_SHARD_QUEUE * | q | ) |
Definition at line 132 of file shard_proxy_queue.c.
References FREE_MEM, t_shard_queue::head, t_shard_queue_ent::next, NULL, t_shard_queue::tail, and t_shard_queue_ent::v.
Referenced by proxy_client_check_waiter_and_wakeup(), proxy_handler_process(), proxy_waiter_timeout(), shard_queue_destroy(), and shard_stmt_check_waiter_and_wakeup().
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().
int shard_queue_enqueue | ( | T_SHARD_QUEUE * | q, |
void * | v | ||
) |
Definition at line 71 of file shard_proxy_queue.c.
References assert, PROXY_LOG, PROXY_LOG_MODE_ERROR, shard_queue_insert_after(), t_shard_queue::tail, and t_shard_queue_ent::v.
Referenced by fn_proxy_cas_prepare(), proxy_handler_process_cas_conn_error(), proxy_process_cas_conn_error(), proxy_process_cas_response(), proxy_process_client_conn_error(), proxy_process_client_register(), proxy_process_client_request(), proxy_wakeup_context_by_shard(), and proxy_wakeup_context_by_statement().
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().
int shard_queue_ordered_enqueue | ( | T_SHARD_QUEUE * | q, |
void * | v, | ||
SHARD_COMP_FN | comp_fn | ||
) |
Definition at line 93 of file shard_proxy_queue.c.
References t_shard_queue::head, t_shard_queue_ent::next, NULL, PROXY_LOG, PROXY_LOG_MODE_ERROR, shard_queue_insert_after(), t_shard_queue::tail, and t_shard_queue_ent::v.
Referenced by fn_proxy_client_prepare(), and proxy_client_add_waiter_by_shard().
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().