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_poll_conf(), gen_mlme_start_conf(), gen_rx_enable_conf(), handle_gts_data_req(), handle_received_frame_irq(), mac_awake_scan(), mac_gen_mcps_data_conf(), mac_gen_mlme_associate_conf(), mac_gen_mlme_disassociate_conf(), mac_gen_mlme_gts_conf(), mac_gts_table_update(), mac_mlme_comm_status(), mac_process_associate_request(), mac_process_beacon_frame(), mac_process_data_frame(), mac_process_disassociate_notification(), mac_process_gts_request(), mac_process_orphan_notification(), mac_process_orphan_realign(), mac_process_tal_data_ind(), mac_process_tal_tx_status(), mac_send_gts_ind(), mac_sync_loss(), mac_tx_coord_realignment_command(), mcps_data_request(), mcps_purge_request(), mlme_associate_response(), mlme_disassociate_request(), mlme_get_request(), mlme_scan_request(), mlme_set_request(), parse_mpdu(), scan_clean_up(), scan_proceed(), send_reset_conf(), tal_rx_frame_cb(), wpan_mcps_data_req(), wpan_mcps_purge_req(), wpan_mlme_associate_req(), wpan_mlme_associate_resp(), wpan_mlme_disassociate_req(), wpan_mlme_get_req(), wpan_mlme_gts_req(), wpan_mlme_orphan_resp(), wpan_mlme_poll_req(), wpan_mlme_reset_req(), wpan_mlme_rx_enable_req(), wpan_mlme_scan_req(), wpan_mlme_set_req(), wpan_mlme_start_req(), and wpan_mlme_sync_req().
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_gts_queues(), and 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(), init_gts_queues(), mac_init(), tal_init(), and wpan_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.
Referenced by handle_gts_data_req(), handle_persistence_time_decrement(), mac_buffer_add_pending(), and mac_process_data_request().
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(), handle_gts_data_req(), handle_persistence_time_decrement(), mac_buffer_purge(), mac_task(), mac_tx_gts_data(), mac_tx_pending_bc_data(), process_deallocate_data_q(), qmm_queue_flush(), remove_frame_from_gts_q(), remove_frame_from_indirect_q(), tal_reset(), tal_task(), and wpan_task().
uint8_t(* search_t::criteria_func)(void *buf, void *handle) |
Pointer to search criteria function.
Referenced by handle_persistence_time_decrement(), mac_buffer_add_pending(), mac_buffer_purge(), mac_process_data_request(), queue_read_or_remove(), remove_frame_from_gts_q(), and remove_frame_from_indirect_q().
void* search_t::handle |
Handle to callbck parameter.
Referenced by mac_buffer_purge(), mac_process_data_request(), queue_read_or_remove(), remove_frame_from_gts_q(), and remove_frame_from_indirect_q().
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 handle_gts_data_req(), mac_build_and_tx_beacon(), mac_coord_realignment_command_tx_success(), mac_process_tal_data_ind(), mac_ready_to_sleep(), mac_t_beacon_cb(), mac_t_gts_cb(), mac_t_persistence_cb(), mac_task(), process_data_ind_not_transient(), process_deallocate_data_q(), 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().