XWOS API
4.0
XWOS C/C++ API参考手册
|
操作系统抽象层:顺序锁 更多...
结构体 | |
struct | xwos_sqlk |
XWOS API:顺序锁 更多... | |
宏定义 | |
#define | XWOS_SQLK_INITIALIZER { .ossql = XWOSDL_SQLK_INITIALIZER, } |
XWOS API:顺序锁的初始值 | |
#define | XWOS_SQLK_GRANULARITY XWOSDL_SQLK_GRANULARITY |
操作系统抽象层:顺序锁顺序值的粒度 | |
函数 | |
static void | xwos_sqlk_init (struct xwos_sqlk *sql) |
XWOS API:初始化顺序锁 | |
static xwsq_t | xwos_sqlk_rd_begin (struct xwos_sqlk *sql) |
XWOS API:开启共享读临界区 | |
static bool | xwos_sqlk_rd_retry (struct xwos_sqlk *sql, xwsq_t start) |
XWOS API:关闭共享读临界区,并检查是否需要重试 | |
static xwsq_t | xwos_sqlk_get_seq (struct xwos_sqlk *sql) |
XWOS API:获取顺序锁的顺序值 | |
static void | xwos_sqlk_rdex_lock (struct xwos_sqlk *sql) |
XWOS API:开启独占读临界区 | |
static xwer_t | xwos_sqlk_rdex_trylock (struct xwos_sqlk *sql) |
XWOS API:尝试开启独占读临界区 | |
static void | xwos_sqlk_rdex_unlock (struct xwos_sqlk *sql) |
XWOS API:关闭独占读临界区 | |
static void | xwos_sqlk_rdex_lock_cpuirq (struct xwos_sqlk *sql) |
XWOS API:开启独占读临界区,并关闭本地CPU的中断 | |
static xwer_t | xwos_sqlk_rdex_trylock_cpuirq (struct xwos_sqlk *sql) |
XWOS API:尝试开启独占读临界区,并关闭本地CPU的中断 | |
static void | xwos_sqlk_rdex_unlock_cpuirq (struct xwos_sqlk *sql) |
XWOS API:关闭独占读临界区,并开启本地CPU的中断 | |
static void | xwos_sqlk_rdex_lock_cpuirqsv (struct xwos_sqlk *sql, xwreg_t *cpuirq) |
XWOS API:开启独占读临界区,保存本地CPU的中断标志并关闭 | |
static xwer_t | xwos_sqlk_rdex_trylock_cpuirqsv (struct xwos_sqlk *sql, xwreg_t *cpuirq) |
XWOS API:尝试开启独占读临界区,保存本地CPU的中断标志并关闭 | |
static void | xwos_sqlk_rdex_unlock_cpuirqrs (struct xwos_sqlk *sql, xwreg_t cpuirq) |
XWOS API:关闭独占读临界区,恢复本地CPU的中断标志 | |
static void | xwos_sqlk_rdex_lock_irqs (struct xwos_sqlk *sql, const xwirq_t irqs[], xwsz_t num) |
XWOS API:开启独占读临界区,并关闭部分中断 | |
static xwer_t | xwos_sqlk_rdex_trylock_irqs (struct xwos_sqlk *sql, const xwirq_t irqs[], xwsz_t num) |
XWOS API:尝试开启独占读临界区,并关闭部分中断 | |
static void | xwos_sqlk_rdex_unlock_irqs (struct xwos_sqlk *sql, const xwirq_t irqs[], xwsz_t num) |
XWOS API:关闭独占读临界区,并开启部分中断 | |
static void | xwos_sqlk_rdex_lock_irqssv (struct xwos_sqlk *sql, const xwirq_t irqs[], xwreg_t flags[], xwsz_t num) |
XWOS API:开启独占读临界区,保存部分中断的中断标志并关闭 | |
static xwer_t | xwos_sqlk_rdex_trylock_irqssv (struct xwos_sqlk *sql, const xwirq_t irqs[], xwreg_t flags[], xwsz_t num) |
XWOS API:尝试开启独占读临界区,保存部分中断的中断标志并关闭 | |
static void | xwos_sqlk_rdex_unlock_irqsrs (struct xwos_sqlk *sql, const xwirq_t irqs[], xwreg_t flags[], xwsz_t num) |
XWOS API:关闭独占读临界区,恢复部分中断的中断标志 | |
static void | xwos_sqlk_rdex_lock_bh (struct xwos_sqlk *sql) |
XWOS API:开启独占读临界区,关闭本地CPU的中断底半部 | |
static xwer_t | xwos_sqlk_rdex_trylock_bh (struct xwos_sqlk *sql) |
XWOS API:尝试开启独占读临界区,关闭本地CPU的中断底半部 | |
static void | xwos_sqlk_rdex_unlock_bh (struct xwos_sqlk *sql) |
XWOS API:关闭独占读临界区,开启本地CPU的中断底半部 | |
static void | xwos_sqlk_wr_lock (struct xwos_sqlk *sql) |
XWOS API:开启写临界区 | |
static xwer_t | xwos_sqlk_wr_trylock (struct xwos_sqlk *sql) |
XWOS API:尝试开启写临界区 | |
static void | xwos_sqlk_wr_unlock (struct xwos_sqlk *sql) |
XWOS API:关闭写临界区 | |
static void | xwos_sqlk_wr_lock_cpuirq (struct xwos_sqlk *sql) |
XWOS API:开启写临界区,并关闭本地CPU的中断 | |
static xwer_t | xwos_sqlk_wr_trylock_cpuirq (struct xwos_sqlk *sql) |
XWOS API:尝试开启写临界区,并关闭本地CPU的中断 | |
static void | xwos_sqlk_wr_unlock_cpuirq (struct xwos_sqlk *sql) |
XWOS API:关闭写临界区,并开启本地CPU的中断 | |
static void | xwos_sqlk_wr_lock_cpuirqsv (struct xwos_sqlk *sql, xwreg_t *cpuirq) |
XWOS API:开启写临界区,保存本地CPU的中断标志并关闭 | |
static xwer_t | xwos_sqlk_wr_trylock_cpuirqsv (struct xwos_sqlk *sql, xwreg_t *cpuirq) |
XWOS API:尝试开启写临界区,保存本地CPU的中断标志并关闭 | |
static void | xwos_sqlk_wr_unlock_cpuirqrs (struct xwos_sqlk *sql, xwreg_t cpuirq) |
XWOS API:关闭写临界区,恢复本地CPU的中断标志 | |
static void | xwos_sqlk_wr_lock_irqs (struct xwos_sqlk *sql, const xwirq_t irqs[], xwsz_t num) |
XWOS API:开启写临界区,并关闭部分中断 | |
static xwer_t | xwos_sqlk_wr_trylock_irqs (struct xwos_sqlk *sql, const xwirq_t irqs[], xwsz_t num) |
XWOS API:尝试开启写临界区,并关闭部分中断 | |
static void | xwos_sqlk_wr_unlock_irqs (struct xwos_sqlk *sql, const xwirq_t irqs[], xwsz_t num) |
XWOS API:关闭写临界区,并开启部分中断 | |
static void | xwos_sqlk_wr_lock_irqssv (struct xwos_sqlk *sql, const xwirq_t irqs[], xwreg_t flags[], xwsz_t num) |
XWOS API:开启写临界区,保存部分中断的中断标志并关闭 | |
static xwer_t | xwos_sqlk_wr_trylock_irqssv (struct xwos_sqlk *sql, const xwirq_t irqs[], xwreg_t flags[], xwsz_t num) |
XWOS API:尝试开启写临界区,保存部分中断的中断标志并关闭 | |
static void | xwos_sqlk_wr_unlock_irqsrs (struct xwos_sqlk *sql, const xwirq_t irqs[], xwreg_t flags[], xwsz_t num) |
XWOS API:关闭写临界区,恢复部分中断的中断标志 | |
static void | xwos_sqlk_wr_lock_bh (struct xwos_sqlk *sql) |
XWOS API:开启写临界区,关闭本地CPU的中断底半部 | |
static xwer_t | xwos_sqlk_wr_trylock_bh (struct xwos_sqlk *sql) |
XWOS API:尝试开启写临界区,关闭本地CPU的中断底半部 | |
static void | xwos_sqlk_wr_unlock_bh (struct xwos_sqlk *sql) |
XWOS API:关闭写临界区,开启本地CPU的中断底半部 | |
操作系统抽象层:顺序锁
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/.
在文件 seqlock.h 中定义.