XWOS API  4.0
XWOS C/C++ API参考手册
载入中...
搜索中...
未找到
Cpu.hxx
浏览该文件的文档.
1
13#ifndef __xwos_cxx_Cpu_hxx__
14#define __xwos_cxx_Cpu_hxx__
15
16#include <xwos/osal/skd.hxx>
17#include <xwos/osal/irq.hxx>
18
19namespace xwos {
20
34class Cpu
35{
36 private:
37 Cpu() {}
38 ~Cpu() {}
39
40 public:
42 static xwer_t pauseLocalScheduler() { return xwosdl_skd_pause_lc(); }
45 static void getContext(xwsq_t * ctxbuf, xwirq_t * irqnbuf) {
46 xwos_skd_get_context_lc(ctxbuf, irqnbuf);
47 }
50 static void disableLocalBh() { xwos_skd_dsbh_lc(); }
51 static void enableLocalBh() { xwos_skd_enbh_lc(); }
56 static void saveLocalIrq(xwreg_t * cpuirq) { xwos_cpuirq_save_lc(cpuirq); }
57 static void restoreLocalIrq(xwreg_t cpuirq) { xwos_cpuirq_restore_lc(cpuirq); }
58 static bool testLocalIrq() { return xwos_cpuirq_test_lc(); }
60 static void disableIrq(xwirq_t irqn) { xwos_irq_disable(irqn); }
61 static void enableIrq(xwirq_t irqn) { xwos_irq_enable(irqn); }
62 static void saveIrq(xwirq_t irqn, xwreg_t * flag) { xwos_irq_save(irqn, flag); }
63 static void restoreIrq(xwirq_t irqn, xwreg_t flag) { xwos_irq_restore(irqn, flag); }
64};
65
70} // namespace xwos
71
72#endif /* xwos/cxx/Cpu.hxx */
~Cpu()
Definition Cpu.hxx:38
static void enableLocalBh()
Definition Cpu.hxx:51
static void saveIrq(xwirq_t irqn, xwreg_t *flag)
Definition Cpu.hxx:62
Cpu()
Definition Cpu.hxx:37
static void restoreIrq(xwirq_t irqn, xwreg_t flag)
Definition Cpu.hxx:63
static void enableLocalPreemption()
Definition Cpu.hxx:49
static void disableLocalPreemption()
Definition Cpu.hxx:48
static void saveLocalIrq(xwreg_t *cpuirq)
Definition Cpu.hxx:56
static xwer_t pauseLocalScheduler()
Definition Cpu.hxx:42
static void enableIrq(xwirq_t irqn)
Definition Cpu.hxx:61
static void disableLocalIrq()
Definition Cpu.hxx:52
static bool testLocalIrq()
Definition Cpu.hxx:58
static xwer_t continueLocalScheduler()
Definition Cpu.hxx:43
static void restoreLocalIrq(xwreg_t cpuirq)
Definition Cpu.hxx:57
static void enableLocalIrq()
Definition Cpu.hxx:53
static void resumeLocalIrq()
Definition Cpu.hxx:55
static void suspendLocalIrq()
Definition Cpu.hxx:54
static void disableLocalBh()
Definition Cpu.hxx:50
static xwer_t startLocalSchedule()
Definition Cpu.hxx:41
static void getContext(xwsq_t *ctxbuf, xwirq_t *irqnbuf)
Definition Cpu.hxx:45
static xwid_t getLocalCpuId()
Definition Cpu.hxx:44
static void disableIrq(xwirq_t irqn)
Definition Cpu.hxx:60
static xwer_t xwos_irq_disable(xwirq_t irqn)
XWOS API:关闭中断
Definition irq.h:82
static bool xwos_cpuirq_test_lc(void)
XWOS API:测试本地CPU的中断开关状态 return 本地CPU的中断状态 retval true: 开启中断 retval false: 关闭中断
Definition irq.h:234
static void xwos_cpuirq_suspend_lc(void)
XWOS API:暂停本地CPU的中断
Definition irq.h:192
static void xwos_cpuirq_enable_lc(void)
XWOS API:开启本地CPU的中断
Definition irq.h:148
static void xwos_cpuirq_save_lc(xwreg_t *cpuirq)
XWOS API:保存然后关闭本地CPU的中断开关
Definition irq.h:220
static xwer_t xwos_irq_save(xwirq_t irqn, xwreg_t *flag)
XWOS API:保存中断的开关,然后将其关闭
Definition irq.h:100
static xwer_t xwos_irq_restore(xwirq_t irqn, xwreg_t flag)
XWOS API:恢复中断的开关
Definition irq.h:117
static void xwos_cpuirq_disable_lc(void)
XWOS API:关闭本地CPU的中断
Definition irq.h:162
static void xwos_cpuirq_restore_lc(xwreg_t cpuirq)
XWOS API:恢复本地CPU的中断开关
Definition irq.h:206
static void xwos_cpuirq_resume_lc(void)
XWOS API:恢复本地CPU的中断
Definition irq.h:177
static xwer_t xwos_irq_enable(xwirq_t irqn)
XWOS API:开启中断
Definition irq.h:66
signed long xwer_t
Definition type.h:554
unsigned long xwid_t
Definition type.h:481
signed int xwirq_t
Definition type.h:517
unsigned long xwsq_t
Definition type.h:445
xwptr_t xwreg_t
Definition type.h:409
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 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
C++操作系统抽象层:IRQ
Definition Cpu.hxx:19
C++操作系统抽象层:调度器