XWOS API  4.0
XWOS C/C++ API参考手册
载入中...
搜索中...
未找到
skd.h
浏览该文件的文档.
1
13#ifndef __xwos_osal_skd_h__
14#define __xwos_osal_skd_h__
15
16#include <xwos/standard.h>
17#include <xwos/osal/jack/skd.h>
18#include <xwos/osal/time.h>
19
89#define XWOS_SKD_PRIORITY_RT_MIN XWOSDL_SKD_PRIORITY_RT_MIN
90
94#define XWOS_SKD_PRIORITY_RT_MAX XWOSDL_SKD_PRIORITY_RT_MAX
95
99#define XWOS_SKD_PRIORITY_INVALID XWOSDL_SKD_PRIORITY_INVALID
100
104#define XWOS_SKD_PRIORITY_RAISE(base, inc) XWOSDL_SKD_PRIORITY_RAISE(base, inc)
105
109#define XWOS_SKD_PRIORITY_DROP(base, dec) XWOSDL_SKD_PRIORITY_DROP(base, dec)
110 // xwos_skd_priority
112
113
122#define XWOS_SKD_CONTEXT_BOOT XWOSDL_SKD_CONTEXT_BOOT
123
127#define XWOS_SKD_CONTEXT_THD XWOSDL_SKD_CONTEXT_THD
128
132#define XWOS_SKD_CONTEXT_ISR XWOSDL_SKD_CONTEXT_ISR
133
137#define XWOS_SKD_CONTEXT_BH XWOSDL_SKD_CONTEXT_BH
138
142#define XWOS_SKD_CONTEXT_IDLE XWOSDL_SKD_CONTEXT_IDLE
143 // xwos_skd_context
145
149#define XWOS_THD_LOCAL_DATA_NUM XWOSDL_THD_LOCAL_DATA_NUM
150
151
163{
164 return xwosdl_skd_prio_tst_valid(prio);
165}
166
179{
180 return xwosdl_skd_start_lc();
181}
182
191{
192 return xwosdl_skd_get_cpuid_lc();
193}
194
204void xwos_skd_get_context_lc(xwsq_t * ctxbuf, xwirq_t * irqnbuf)
205{
206 xwosdl_skd_get_context_lc(ctxbuf, irqnbuf);
207}
208
216{
217 xwosdl_skd_dspmpt_lc();
218}
219
227{
228 xwosdl_skd_enpmpt_lc();
229}
230
238{
239 xwosdl_skd_dsbh_lc();
240}
241
249{
250 xwosdl_skd_enbh_lc();
251}
252
266{
267 return xwosdl_skd_continue_lc();
268}
269
283{
284 return xwosdl_skd_pause_lc();
285}
286 // xwos_skd
288
289
290#endif /* xwos/osal/skd.h */
#define __xwos_inline_api
Definition compiler.h:179
signed long xwer_t
Definition type.h:554
unsigned long xwid_t
Definition type.h:481
xws32_t xwpr_t
Definition type.h:534
signed int xwirq_t
Definition type.h:517
unsigned long xwsq_t
Definition type.h:445
static xwer_t xwos_skd_continue_lc(void)
XWOS API:继续运行本地CPU调度器
Definition skd.h:265
static void xwos_skd_enpmpt_lc(void)
XWOS API:开启本地CPU调度器的抢占
Definition skd.h:226
static xwer_t xwos_skd_start_lc(void)
XWOS API:启动当前CPU的调度器
Definition skd.h:178
static void xwos_skd_dspmpt_lc(void)
XWOS API:关闭本地CPU调度器的抢占
Definition skd.h:215
static bool xwos_skd_prio_tst_valid(xwpr_t prio)
XWOS API:检查优先级是否有效
Definition skd.h:162
static xwer_t xwos_skd_pause_lc(void)
XWOS API:暂停本地CPU调度器
Definition skd.h:282
static xwid_t xwos_skd_get_cpuid_lc(void)
XWOS API:获取当前CPU的ID
Definition skd.h:190
static void xwos_skd_get_context_lc(xwsq_t *ctxbuf, xwirq_t *irqnbuf)
XWOS API:获取当前代码的上下文
Definition skd.h:204
static void xwos_skd_enbh_lc(void)
XWOS API:开启本地CPU调度器的中断底半部
Definition skd.h:248
static void xwos_skd_dsbh_lc(void)
XWOS API:关闭本地CPU调度器的中断底半部
Definition skd.h:237
操作系统抽象层:调度接口描述
操作系统抽象层:时间
XWOS的标准头文件