This file implements the functions for initializing the queues, appending a buffer into the queue, removing a buffer from the queue and reading a buffer from the queue as per the search criteria.
Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
#include "pal.h"
#include "return_val.h"
#include "bmm.h"
#include "qmm.h"
#include "app_config.h"
Typedefs | |
typedef enum buffer_mode_tag | buffer_mode_t |
Enumerations | |
enum | buffer_mode_tag { REMOVE_MODE, READ_MODE } |
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... | |
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... | |
static buffer_t * | queue_read_or_remove (queue_t *q, buffer_mode_t mode, search_t *search) |
typedef enum buffer_mode_tag buffer_mode_t |
enum buffer_mode_tag |
|
static |
References buffer_t::body, search_t::criteria_func, ENTER_CRITICAL_REGION, search_t::handle, queue_tag::head, LEAVE_CRITICAL_REGION, buffer_t::next, REMOVE_MODE, queue_tag::size, and queue_tag::tail.
Referenced by qmm_queue_read(), and qmm_queue_remove().