24#ifndef QUEUES_INCLUDED
25#define QUEUES_INCLUDED
57#define queue_top(queue) ((queue)->root[1])
58#define queue_element(queue, index) ((queue)->root[index + 1])
59#define queue_end(queue) ((queue)->root[(queue)->elements])
unsigned int PSI_memory_key
Instrumented memory key.
Definition: psi_memory_bits.h:49
Some integer typedefs for easier portability.
unsigned char uchar
Definition: my_inttypes.h:52
static QUEUE queue
Definition: myisampack.cc:210
Performance schema instrumentation interface.
static bool queue_is_full(QUEUE *queue)
Definition: queues.h:81
static bool is_queue_inited(QUEUE *queue)
Definition: queues.h:85
int init_queue(QUEUE *queue, PSI_memory_key psi_key, uint max_elements, uint offset_to_key, bool max_at_top, queue_compare compare, void *first_cmp_arg)
void _downheap(QUEUE *queue, uint idx)
Definition: queues.cc:211
uchar * queue_remove(QUEUE *queue, uint idx)
Definition: queues.cc:202
void delete_queue(QUEUE *queue)
Definition: queues.cc:175
void queue_fix(QUEUE *queue)
Definition: queues.cc:259
static void queue_replaced(QUEUE *queue)
Definition: queues.h:61
void queue_insert(QUEUE *queue, uchar *element)
Definition: queues.cc:183
int(* queue_compare)(void *, uchar *, uchar *)
Definition: queues.h:67
int reinit_queue(QUEUE *queue, PSI_memory_key psi_key, uint max_elements, uint offset_to_key, bool max_at_top, queue_compare compare, void *first_cmp_arg)
static void queue_remove_all(QUEUE *queue)
Definition: queues.h:79
static void queue_set_max_at_top(QUEUE *queue, int set_arg)
Definition: queues.h:63
static int compare(size_t a, size_t b)
Function to compare two size_t integers for their relative order.
Definition: rpl_utility.cc:107
uint auto_extent
Definition: queues.h:51
uchar ** root
Definition: queues.h:44
int(* compare)(void *, uchar *, uchar *)
Definition: queues.h:50
void * first_cmp_arg
Definition: queues.h:45
int max_at_top
Definition: queues.h:49
uint max_elements
Definition: queues.h:47
uint elements
Definition: queues.h:46
uint offset_to_key
Definition: queues.h:48