Queue Management: provides services for creating and maintaining the queues.
Data Structures | |
struct | queue_tag |
Queue structure. More... | |
struct | search_t |
Structure to search for a buffer to be removed from a queue. More... | |
Typedefs | |
typedef struct queue_tag | queue_t |
Queue structure. More... | |
Functions | |
void | qmm_queue_append (queue_t *q, buffer_t *buf) |
Appends a buffer into the queue. More... | |
void | qmm_queue_flush (queue_t *q) |
Internal function for flushing a specific queue. More... | |
__PACK__RST_DATA__ void | qmm_queue_init (queue_t *q) |
Initializes the queue. More... | |
buffer_t * | qmm_queue_read (queue_t *q, search_t *search) |
Reads a buffer from queue. More... | |
buffer_t * | qmm_queue_remove (queue_t *q, search_t *search) |
Removes a buffer from queue. More... | |
Variables | |
uint8_t(* | search_t::criteria_func )(void *buf, void *handle) |
Pointer to search criteria function. More... | |
void * | search_t::handle |
Handle to callbck parameter. More... | |
buffer_t * | queue_tag::head |
Pointer to head of queue. More... | |
uint8_t | queue_tag::size |
Number of buffers present in the current queue. More... | |
buffer_t * | queue_tag::tail |
Pointer to tail of queue. More... | |
Queue structure.
This structur defines the queue structure. The application should declare the queue of type queue_t and call qmm_queue_init before invoking any other functionality of qmm.
Appends a buffer into the queue.
This function appends a buffer into the queue.
q | Queue into which buffer should be appended |
buf | Pointer to the buffer that should be appended into the queue. Note that this pointer should be same as the pointer returned by bmm_buffer_alloc. |
References Assert, ENTER_CRITICAL_REGION, queue_tag::head, LEAVE_CRITICAL_REGION, MAC_SUCCESS, buffer_t::next, QUEUE_FULL, queue_tag::size, and queue_tag::tail.
Referenced by bmm_buffer_free(), bmm_buffer_init(), gen_mlme_start_conf(), gen_rx_enable_conf(), handle_received_frame_irq(), mac_awake_scan(), mac_gen_mcps_data_conf(), mac_process_beacon_frame(), mac_process_data_frame(), mac_process_tal_data_ind(), mac_process_tal_tx_status(), mac_tx_coord_realignment_command(), mcps_data_request(), mlme_scan_request(), parse_mpdu(), scan_clean_up(), scan_proceed(), send_reset_conf(), and tal_rx_frame_cb().
void qmm_queue_flush | ( | queue_t * | q | ) |
Internal function for flushing a specific queue.
q | Queue to be flushed |
References bmm_buffer_free(), qmm_queue_remove(), and queue_tag::size.
Referenced by flush_queues().
__PACK__RST_DATA__ void qmm_queue_init | ( | queue_t * | q | ) |
Initializes the queue.
This function initializes the queue. Note that this function should be called before invoking any other functionality of QMM.
q | The queue which should be initialized. |
References queue_tag::head, queue_tag::size, and queue_tag::tail.
Referenced by bmm_buffer_init(), mac_init(), and tal_init().
Reads a buffer from queue.
This function reads either the first buffer if search is NULL or buffer matching the given criteria from queue.
q | The queue from which buffer should be read. |
search | If this parameter is NULL first buffer in the queue will be read. Otherwise buffer matching the criteria will be read |
References queue_read_or_remove(), and READ_MODE.
Removes a buffer from queue.
This function removes a buffer from queue
q | Queue from which buffer should be removed |
search | Search criteria. If this parameter is NULL, first buffer in the queue will be removed. Otherwise buffer matching the criteria will be removed. |
References queue_read_or_remove(), and REMOVE_MODE.
Referenced by bmm_buffer_alloc(), mac_task(), qmm_queue_flush(), tal_reset(), and tal_task().
uint8_t(* search_t::criteria_func)(void *buf, void *handle) |
Pointer to search criteria function.
Referenced by queue_read_or_remove().
void* search_t::handle |
Handle to callbck parameter.
Referenced by queue_read_or_remove().
buffer_t* queue_tag::head |
Pointer to head of queue.
Referenced by qmm_queue_append(), qmm_queue_init(), and queue_read_or_remove().
uint8_t queue_tag::size |
Number of buffers present in the current queue.
Referenced by mac_ready_to_sleep(), mac_task(), qmm_queue_append(), qmm_queue_flush(), qmm_queue_init(), queue_read_or_remove(), tal_reset(), and tal_task().
buffer_t* queue_tag::tail |
Pointer to tail of queue.
Referenced by qmm_queue_append(), qmm_queue_init(), and queue_read_or_remove().