XWOS API
4.0
XWOS C/C++ API参考手册
|
操作系统抽象层:自旋锁 更多...
结构体 | |
struct | xwos_splk |
XWOS API:自旋锁 更多... | |
宏定义 | |
#define | XWOS_SPLK_INITIALIZER { .osspl = XWOSDL_SPLK_INITIALIZER, } |
XWOS API:自旋锁的初始值 | |
函数 | |
static void | xwos_splk_init (struct xwos_splk *spl) |
XWOS API:初始化自旋锁 | |
static void | xwos_splk_lock (struct xwos_splk *spl) |
XWOS API:上锁自旋锁,若自旋锁已开启临界区,就自旋等待 | |
static xwer_t | xwos_splk_trylock (struct xwos_splk *spl) |
XWOS API:尝试上锁自旋锁 | |
static void | xwos_splk_unlock (struct xwos_splk *spl) |
XWOS API:解锁自旋锁 | |
static void | xwos_splk_lock_cpuirq (struct xwos_splk *spl) |
XWOS API:上锁自旋锁,并关闭本地CPU的中断 | |
static xwer_t | xwos_splk_trylock_cpuirq (struct xwos_splk *spl) |
XWOS API:尝试上锁自旋锁,并关闭本地CPU的中断 | |
static void | xwos_splk_unlock_cpuirq (struct xwos_splk *spl) |
XWOS API:解锁自旋锁,并开启本地CPU的中断 | |
static void | xwos_splk_lock_cpuirqsv (struct xwos_splk *spl, xwreg_t *cpuirq) |
XWOS API:上锁自旋锁,保存本地CPU的中断标志并关闭 | |
static xwer_t | xwos_splk_trylock_cpuirqsv (struct xwos_splk *spl, xwreg_t *cpuirq) |
XWOS API:尝试上锁自旋锁,保存本地CPU的中断标志并关闭 | |
static void | xwos_splk_unlock_cpuirqrs (struct xwos_splk *spl, xwreg_t cpuirq) |
XWOS API:解锁自旋锁,并恢复本地CPU的中断标志 | |
static void | xwos_splk_lock_irqs (struct xwos_splk *spl, const xwirq_t irqs[], xwsz_t num) |
XWOS API:上锁自旋锁,并关闭部分中断 | |
static xwer_t | xwos_splk_trylock_irqs (struct xwos_splk *spl, const xwirq_t irqs[], xwsz_t num) |
XWOS API:尝试上锁自旋锁,并关闭部分中断 | |
static void | xwos_splk_unlock_irqs (struct xwos_splk *spl, const xwirq_t irqs[], xwsz_t num) |
XWOS API:解锁自旋锁,并开启部分中断 | |
static void | xwos_splk_lock_irqssv (struct xwos_splk *spl, const xwirq_t irqs[], xwreg_t flags[], xwsz_t num) |
XWOS API:上锁自旋锁,保存部分中断的中断标志并关闭 | |
static xwer_t | xwos_splk_trylock_irqssv (struct xwos_splk *spl, const xwirq_t irqs[], xwreg_t flags[], xwsz_t num) |
XWOS API:尝试上锁自旋锁,保存部分中断的中断标志并关闭 | |
static void | xwos_splk_unlock_irqsrs (struct xwos_splk *spl, const xwirq_t irqs[], xwreg_t flags[], xwsz_t num) |
XWOS API:解锁自旋锁,并恢复部分中断的中断标志 | |
static void | xwos_splk_lock_bh (struct xwos_splk *spl) |
XWOS API:上锁自旋锁,关闭本地CPU的中断底半部 | |
static xwer_t | xwos_splk_trylock_bh (struct xwos_splk *spl) |
XWOS API:尝试上锁自旋锁,关闭本地CPU的中断底半部 | |
static void | xwos_splk_unlock_bh (struct xwos_splk *spl) |
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/.
在文件 spinlock.h 中定义.