8#ifndef MFRAME_DB2618AE_F498_4792_900C_A4BD1DC2E35C
9#define MFRAME_DB2618AE_F498_4792_900C_A4BD1DC2E35C
18#include "./../func/Runnable.h"
19#include "./../io/PrintBuffer.h"
20#include "./../io/RingBuffer.h"
21#include "./../sys/ErrorCode.h"
22#include "./../sys/Kernel.h"
23#include "./../sys/Svchost.h"
24#include "./../sys/SystemConfig.h"
25#include "./../sys/SystemControl.h"
26#include "./../sys/Thread.h"
32#define MFRAME_THROW(message, code) \
33 mframe::lang::System::throwError(message, __PRETTY_FUNCTION__, code)
35#define MFRAME_THROW(message, code) \
36 mframe::lang::System::throwError("", "", code)
158 static void throwError(
const char* message,
const char* path,
184 static bool delay(
int milliseconds);
Definition PrintBuffer.h:32
static void reboot(void)
設備重新啟動
static int lock(void)
核心鎖定,在調用systemUnlock以前將不會進行執行緒切換
static void wait(void)
導致當前線程等待,直到另一個線程調用此對象的 notify()方法或 notifyAll()方法,或其他一些線 程中斷當前線程,或一定量的實時時間。
static bool delay(int milliseconds)
函數 delay 等待內核滴答中指定的時間段。 對於1的值,系統等待直到下一個計時器滴答發生。 實際時間延遲最多可能比指定時間少一個計時器滴答聲,即在下一個系統滴答聲發生之前立即調用 osDelay(1...
static void start(mframe::func::Runnable &task, int stackSize)
系統初始化核心
static mframe::sys::SystemControl & getControl(void)
取得系統層控制項目。
static void execute(mframe::func::Runnable &runnable)
static void setup(mframe::sys::SystemConfig &systemConfig)
static void lowerDelay(uint32 times)
static void throwError(const char *message, const char *path, mframe::sys::ErrorCode code)
拋出錯誤
static bool wait(int timeout)
導致當前線程等待,直到另一個線程調用此對象的notify()方法或notifyAll()方法,或指定的時間已 過。
static bool yield(void)
函數yield()將控制權傳遞給處於READY狀態且具有相同優先級的下一個線程。 如果在READY狀態下沒有其他優先級相同的線程,則當前線程繼續執行,不會發生線程切換。
static int getCoreClock(void)
Get the Core Clock object.
static mframe::lang::Readable & in(void)
static mframe::sys::Allocator * getAllocator(void)
Get the Allocator object.
static void error(const void *address, mframe::sys::ErrorCode code)
錯誤拋出
static mframe::io::PrintBuffer & out(void)
static mframe::sys::Thread * currentThread(void)
取得當前的執行緒
static mframe::sys::Thread & allocThread(mframe::func::Runnable &runnable, mframe::lang::Data &stackMemory)
static mframe::sys::Thread & allocThread(mframe::func::Runnable &runnable, int stackSize)
Definition Appendable.h:23
ErrorCode
Definition ErrorCode.h:29
Definition Allocator.h:30
Definition HardwareInfo.h:29
Definition SystemConfig.h:34
Definition SystemControl.h:31