XWOS API
4.0
XWOS C/C++ API参考手册
|
循环队列:模块接口 更多...
#include <xwos/standard.h>
#include <xwos/lib/object.h>
#include <xwos/lib/bclst.h>
#include <xwos/osal/lock/spinlock.h>
#include <xwos/osal/sync/sem.h>
#include <xwos/osal/sync/sel.h>
结构体 | |
struct | xwcq |
循环队列对象 更多... | |
struct | xwcq_d |
循环队列对象描述符 更多... | |
宏定义 | |
#define | XWCQ_DEF_MEMPOOL(name, slotsize, slotnum) __xwcc_alignl1cache xwu8_t name[(slotsize) * (slotnum)] |
定义循环队列缓冲区 | |
函数 | |
xwer_t | xwcq_init (struct xwcq *cq, xwsz_t slotsize, xwsz_t slotnum, xwu8_t *mem) |
XWCQ API:初始化循环队列 | |
xwer_t | xwcq_fini (struct xwcq *cq) |
XWCQ API:销毁循环队列对象 | |
xwsq_t | xwcq_get_tik (struct xwcq *cq) |
XWCQ API:获取循环队列对象的标签 | |
static xwcq_d | xwcq_get_d (struct xwcq *cq) |
XWCQ API:获取循环队列对象描述符 | |
xwer_t | xwcq_acquire (xwcq_d cqd) |
XWCQ API:检查循环队列对象的标签并增加引用计数 | |
xwer_t | xwcq_release (xwcq_d cqd) |
XWCQ API:检查循环队列对象的标签并增加引用计数 | |
xwer_t | xwcq_grab (struct xwcq *cq) |
XWCQ API:增加循环队列对象的引用计数 | |
xwer_t | xwcq_put (struct xwcq *cq) |
XWCQ API:减少循环队列对象的引用计数 | |
xwer_t | xwcq_eq (struct xwcq *cq, const xwu8_t *data, xwsz_t *size) |
XWCQ API:将数据发送到循环队列的 尾端 (入队,EnQueue) | |
xwer_t | xwcq_jq (struct xwcq *cq, const xwu8_t *data, xwsz_t *size) |
XWCQ API:将数据发送循环队列的 首端 (插队,Jump the Queue) | |
xwer_t | xwcq_dq (struct xwcq *cq, xwu8_t *data, xwsz_t *size) |
XWCQ API: 等待从循环队列的 首端 接收数据 (离队,DeQueue) | |
xwer_t | xwcq_dq_to (struct xwcq *cq, xwu8_t *data, xwsz_t *size, xwtm_t to) |
XWCQ API: 限时等待从循环队列的 首端 接收数据 (离队,DeQueue) | |
xwer_t | xwcq_dq_unintr (struct xwcq *cq, xwu8_t *data, xwsz_t *size) |
XWCQ API: 等待从循环队列的 首端 接收数据 (离队,DeQueue), 并且等待不可被中断 | |
xwer_t | xwcq_trydq (struct xwcq *cq, xwu8_t *data, xwsz_t *size) |
XWCQ API: 尝试从循环队列的 首端 接收数据 (离队,DeQueue) | |
xwer_t | xwcq_rq (struct xwcq *cq, xwu8_t *data, xwsz_t *size) |
XWCQ API: 等待从循环队列的 尾端 接收数据 (反向离队,Reversely deQueue) | |
xwer_t | xwcq_rq_to (struct xwcq *cq, xwu8_t *data, xwsz_t *size, xwtm_t to) |
XWCQ API: 限时等待从循环队列的 尾端 接收数据 (反向离队,Reversely deQueue) | |
xwer_t | xwcq_rq_unintr (struct xwcq *cq, xwu8_t *data, xwsz_t *size) |
XWCQ API: 等待从循环队列的 尾端 接收数据 (反向离队,Reversely deQueue), 并且等待不可被中断 | |
xwer_t | xwcq_tryrq (struct xwcq *cq, xwu8_t *data, xwsz_t *size) |
XWCQ API: 尝试从循环队列的 尾端 接收数据 (反向离队,Reversely deQueue) | |
xwer_t | xwcq_pfq (struct xwcq *cq, xwu8_t *data, xwsz_t *size) |
XWCQ API: 等待从循环队列 头端 拷贝数据 (Peek at the Front of Queue) | |
xwer_t | xwcq_pfq_to (struct xwcq *cq, xwu8_t *data, xwsz_t *size, xwtm_t to) |
XWCQ API: 限时等待从循环队列 头端 拷贝数据 (Peek at the Front of Queue) | |
xwer_t | xwcq_pfq_unintr (struct xwcq *cq, xwu8_t *data, xwsz_t *size) |
XWCQ API: 等待从循环队列 头端 拷贝数据 (Peek at the Front of Queue), 并且等待不可被中断 | |
xwer_t | xwcq_trypfq (struct xwcq *cq, xwu8_t *data, xwsz_t *size) |
XWCQ API: 尝试从循环队列 头端 拷贝数据 (Peek at the Front of Queue) | |
xwer_t | xwcq_prq (struct xwcq *cq, xwu8_t *data, xwsz_t *size) |
XWCQ API: 等待从循环队列 尾端 拷贝数据 (Peek at the Rear of Queue) | |
xwer_t | xwcq_prq_to (struct xwcq *cq, xwu8_t *data, xwsz_t *size, xwtm_t to) |
XWCQ API: 限时等待从循环队列 尾端 拷贝数据 (Peek at the Rear of Queue) | |
xwer_t | xwcq_prq_unintr (struct xwcq *cq, xwu8_t *data, xwsz_t *size) |
XWCQ API: 等待从循环队列 尾端 拷贝数据 (Peek at the Rear of Queue), 并且等待不可被中断 | |
xwer_t | xwcq_tryprq (struct xwcq *cq, xwu8_t *data, xwsz_t *size) |
XWCQ API: 尝试从循环队列 尾端 拷贝数据 (Peek at the Rear of Queue) | |
xwer_t | xwcq_flush (struct xwcq *cq) |
XWCQ API: 清空循环队列 | |
xwer_t | xwcq_get_capacity (struct xwcq *cq, xwsz_t *capbuf) |
XWCQ API: 获取循环队列的容量 | |
xwer_t | xwcq_get_size (struct xwcq *cq, xwsz_t *szbuf) |
XWCQ API: 获取循环队列的单个数据槽的大小 | |
xwer_t | xwcq_get_availability (struct xwcq *cq, xwsz_t *avbbuf) |
XWCQ API: 获取循环队列中有效数据槽的数量 | |
xwer_t | xwcq_bind (struct xwcq *cq, struct xwos_sel *sel, xwsq_t pos) |
XWOS API:绑定循环队列对象到信号选择器 | |
xwer_t | xwcq_unbind (struct xwcq *cq, struct xwos_sel *sel) |
XWOS API:从信号选择器上解绑循环队列对象 | |
循环队列:模块接口
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
在文件 mif.h 中定义.