XWOS API
4.0
XWOS C/C++ API参考手册
|
操作系统抽象层:信号量 更多...
#include <xwos/standard.h>
#include <xwos/osal/jack/sync/sem.h>
#include <xwos/osal/time.h>
#include <xwos/osal/sync/sel.h>
结构体 | |
struct | xwos_sem |
XWOS API:信号量对象 更多... | |
struct | xwos_sem_d |
XWOS API:信号量对象描述符 更多... | |
宏定义 | |
#define | XWOS_SEM_NILD ((xwos_sem_d){NULL, 0,}) |
XWOS API:空的信号量对象描述符 | |
函数 | |
static xwer_t | xwos_sem_init (struct xwos_sem *sem, xwssq_t val, xwssq_t max) |
XWOS API:静态方式初始化信号量对象 | |
static xwer_t | xwos_sem_fini (struct xwos_sem *sem) |
XWOS API:销毁静态方式初始化的信号量对象 | |
static xwer_t | xwos_sem_grab (struct xwos_sem *sem) |
XWOS API:增加信号量对象的引用计数 | |
static xwer_t | xwos_sem_put (struct xwos_sem *sem) |
XWOS API:减少信号量对象的引用计数 | |
static xwer_t | xwos_sem_create (xwos_sem_d *semd, xwssq_t val, xwssq_t max) |
XWOS API:动态方式创建信号量对象 | |
static xwer_t | xwos_sem_delete (xwos_sem_d semd) |
XWOS API:删除动态方式创建的信号量对象 | |
static xwer_t | xwos_sem_acquire (xwos_sem_d semd) |
XWOS API:检查信号量对象的标签并增加引用计数 | |
static xwer_t | xwos_sem_release (xwos_sem_d semd) |
XWOS API:检查对象的标签并减少引用计数 | |
static xwsq_t | xwos_sem_get_tik (struct xwos_sem *sem) |
XWOS API:获取信号量对象的标签 | |
static xwos_sem_d | xwos_sem_get_d (struct xwos_sem *sem) |
XWOS API:获取信号量对象描述符 | |
static xwer_t | xwos_sem_bind (struct xwos_sem *sem, struct xwos_sel *sel, xwsq_t pos) |
XWOS API:绑定信号量对象到信号选择器 | |
static xwer_t | xwos_sem_unbind (struct xwos_sem *sem, struct xwos_sel *sel) |
XWOS API:从信号选择器上解绑信号量对象 | |
static xwer_t | xwos_sem_freeze (struct xwos_sem *sem) |
XWOS API:冻结信号量对象 | |
static xwer_t | xwos_sem_thaw (struct xwos_sem *sem) |
XWOS API:解冻信号量对象 | |
static xwer_t | xwos_sem_post (struct xwos_sem *sem) |
XWOS API:发布信号量 | |
static xwer_t | xwos_sem_wait (struct xwos_sem *sem) |
XWOS API:等待并获取信号量 | |
static xwer_t | xwos_sem_wait_to (struct xwos_sem *sem, xwtm_t to) |
XWOS API:限时等待并获取信号量 | |
static xwer_t | xwos_sem_wait_unintr (struct xwos_sem *sem) |
XWOS API:等待并获取信号量,且等待不可被中断 | |
static xwer_t | xwos_sem_trywait (struct xwos_sem *sem) |
XWOS API:尝试获取信号量 | |
static xwer_t | xwos_sem_get_max (struct xwos_sem *sem, xwssq_t *max) |
XWOS API:获取信号量对象计数器的最大值 | |
static xwer_t | xwos_sem_get_value (struct xwos_sem *sem, xwssq_t *val) |
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/.
在文件 sem.h 中定义.