?? rtmk.h
字號:
/************************************************************************
*
* Module name : RTMK.H
*
* Module description :
* Header file declares RTMK function prototypes.
*
* Project : RTMK
*
* Target platform : DOS
*
* Compiler & Library : BC++ 3.1
*
* Author : Richard Shen
*
* Creation date : 15 August, 1995
*
************************************************************************/
#ifndef RTMK_H
#define RTMK_H
#include <types.h>
#include <setjmp.h>
#define MSG_BUF_SZ 8 * sizeof(int)
struct PCS
{
jmp_buf context; /* CPU context */
uint evWait; /* Event mask waiting */
uint evReceived; /* Event mask received */
uint procMask; /* Process mask */
uint priority; /* Priority */
bool msgPending; /* Message received */
char msgBuf[MSG_BUF_SZ]; /* Message buffer */
struct PCS *msgSender; /* Message sender */
}; /* struct PCS */
#ifdef __DOS__
typedef struct PCS far *PROCESS;
#else
typedef struct PCS *PROCESS;
#endif /* __DOS__ */
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
uint RtmkRun(void);
uint RtmkStartTask(PROCESS *process, void (*taskEntry)(void),
uint stackSize);
PROCESS RtmkCurrent(void);
uchar RtmkPriority(PROCESS process);
uchar RtmkChangePriority(PROCESS process, uchar newPriority);
uchar RtmkGetPriority(PROCESS process);
void RtmkSend(PROCESS process, uint evCondition);
uint RtmkWait(uint eventMask);
uint RtmkArrived(uint eventMask);
uint RtmkClear(uint eventMask);
void RtmkPut(PROCESS process, void *message);
void *RtmkGet(void *message);
bool RtmkEmpty(void);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* RTMK_H */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -