⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rtmk.h

📁 实时多重作业操作系统内核(RTMK)。简单实时多重作业操作系统内核源程序。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 + -