|
CUBRID Engine
latest
|
#include <stdio.h>#include <stdlib.h>#include <assert.h>#include "cas_common.h"#include "shard_proxy_common.h"#include "shard_proxy_queue.h"
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) |
| 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().

| 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().

| int shard_cqueue_enqueue | ( | T_SHARD_CQUEUE * | q, |
| 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 * | q, |
| 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().

|
static |
Definition at line 212 of file shard_proxy_queue.c.
References assert, and t_shard_cqueue::count.
Referenced by shard_cqueue_dequeue().

|
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().

| 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().

|
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().

| 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().
