📄 rtos.h
字号:
/****************************************************************************
* (C) 1999-2005 by BECK IPC GmbH
*
* BECK IPC GmbH
* Germany
*
* http://www.beck-ipc.com
*
* ---------------------------------------------------------------------------
* Module : RTOS.H
* Function : prototypes and constants of RTOS API
* ---------------------------------------------------------------------------
$Header: /cvsrepo/CANopenNode/_src/CANopen/BECK_SC1x+SJA1000/Clib/RTOS.H,v 1.1 2006/03/08 11:29:44 jani Exp $
*****************************************************************************/
#ifndef _RTOS_H___
#define _RTOS_H___
/*************************************************************************/
//includes
/*************************************************************************/
#include <DOS.H>
#include "rtxapi.h"
/*************************************************************************/
//defines
/*************************************************************************/
#ifdef _MSC_VER /* If Microsoft C Compiler is used, define new FP_SEG and FP_OFF Macro */
#ifdef FP_SEG
#undef FP_SEG
#endif
#define FP_SEG(ptr) ((unsigned int)(((unsigned long)ptr)>>16))
#ifdef FP_OFF
#undef FP_OFF
#endif
#define FP_OFF(ptr) ((unsigned int)(((unsigned long)ptr)&0xFFFF))
#endif
/*************************************************************************/
//prototypes
/*************************************************************************/
#ifdef __cplusplus
extern "C" {
#endif
/*************************************************************************/
//Create a task
/*************************************************************************/
int _cdecl RTX_Create_Task(int far * taskID,
const TaskDefBlock far *taskdefblock);
int _cdecl RTX_Create_Task_Without_Run(int far * taskID,
const TaskDefBlock far *taskdefblock);
/*************************************************************************/
//Delete a task from the system
/*************************************************************************/
int _cdecl RTX_Delete_Task(int taskID);
/*************************************************************************/
//Stop and kill a task
/*************************************************************************/
int _cdecl RTX_Kill_Task(int taskID);
/*************************************************************************/
//Go to sleep for a defined time
/*************************************************************************/
int _cdecl RTX_Sleep_Time(unsigned int time_ms);
/*************************************************************************/
//Go to sleep, until wakerequest
/*************************************************************************/
int _cdecl RTX_Sleep_Request(void);
/*************************************************************************/
//Wakeup a sleeping task
/*************************************************************************/
int _cdecl RTX_Wakeup(int taskID);
/*************************************************************************/
//End execution of task by itself, this functions never returns
/*************************************************************************/
int _cdecl RTX_End_Execution(void);
/*************************************************************************/
//Suspend/Resume task execution
/*************************************************************************/
int _cdecl RTX_Suspend_Task(int taskID);
int _cdecl RTX_Resume_Task (int taskID);
/*************************************************************************/
//Change taskprio
/*************************************************************************/
int _cdecl RTX_Change_TaskPrio(int taskID, int prio, int *error);
/*************************************************************************/
//Get the ID of the current running task
/*************************************************************************/
int _cdecl RTX_Get_TaskID(void);
/*************************************************************************/
//file access
/*************************************************************************/
int _cdecl RTX_Access_Filesystem(void);
/*************************************************************************/
//Get state of a task, using the task monitoring
/*************************************************************************/
int _cdecl RTX_Get_Task_State(const char far * taskname,
Task_StateData far * taskdata,
int * error);
/*************************************************************************/
//Get state of a task, without using the task monitoring
/*************************************************************************/
int _cdecl RTX_Get_Task_State_Ext(const char far * taskname,
unsigned int far * taskstate,
int * error);
/*************************************************************************/
//Get task list
/*************************************************************************/
int _cdecl RTX_Get_Task_List(TaskList far * tasklist, int length);
/*************************************************************************/
//Start taskmonitoring
/*************************************************************************/
void _cdecl RTX_Start_Task_Monitor(void);
/*************************************************************************/
//Start taskmonitoring
/*************************************************************************/
void _cdecl RTX_Stop_Task_Monitor(void);
/*************************************************************************/
//Restart a task, killed with call 0x02
/*************************************************************************/
int _cdecl RTX_Restart_Task(int taskID);
/*************************************************************************/
//Disable the Task Scheduling
/*************************************************************************/
void _cdecl RTX_Disable_Task_Scheduling(void);
/*************************************************************************/
//Enable the Task Scheduling
/*************************************************************************/
void _cdecl RTX_Enable_Task_Scheduling(void);
/*************************************************************************/
// Count RTX resources
/*************************************************************************/
int _cdecl RTX_Count_Resources (RTX_COUNTS far *counts,
void far *details,
unsigned int list_size,
unsigned int filter) ;
/*************************************************************************/
// Read out list of tasks awaiting an RTX object
/*************************************************************************/
int _cdecl RTX_Wait_Queue (unsigned int handle,
void far *details,
unsigned int list_size,
unsigned int filter) ;
/*************************************************************************/
//Wake up a task, which sends direct a message
/*************************************************************************/
int _cdecl RTX_Wake_Msg_Receipt(void);
/*************************************************************************/
//Create a semaphore
/*************************************************************************/
int _cdecl RTX_Create_Sem(int far *semID, const char far *name,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -