📄 event.h
字号:
/************************************************************************ * Program ID: event.h * * Description: * * 1、线程事件驱动头文件 * * Functions: * * int nInitEvent(recEvent *rEvent) * * int nWaitEvent(recEvent *rEvent) * * int nSetEvent(recEvent *rEvent) * * int nDestroyEvent(recEvent *rEvent) * ************************************************************************ * Modification Log: * * Date Author Description * * 2002/03/02 tangwn * ************************************************************************/#ifndef _EVENT_H#define _EVENT_H#include "os.h"#include "datatype.h"#define EVENT_OK 0#define EVENT_TIMEOUT 1 #define EVENT_FAIL -1/************************************************************************ * Function ID: nInitEvent * * Description: * * 1、初始化mutex句柄 * * 2、初始化cond句柄 * * Input Param: * * recEvent *rEvent * * Output Param: * * 无 * * Return: * * 0 - 成功 * * -1 - 失败 * ************************************************************************/int nInitEvent(recEvent *rEvent);/************************************************************************ * Function ID: nWaitEvent * * Description: * * 1、 * * Input Param: * * recEvent *rEvent * * Output Param: * * 无 * * Return: * * 0 - 成功 * * -1 - 失败 * ************************************************************************/int nWaitEvent(recEvent *rEvent);/*********************************************************************** * Function ID: nTimedWaitEvent * Description: * 1、 * Input Param: * recEvent *rEvent, int nWaitTime( 等待时间秒 ) * Output Param: * 无 * Return: * 0 - 成功 * 1 - 超时 * -1 - 失败 **********************************************************************/int nTimedWaitEvent(recEvent *rEvent, int nWaitTime);/************************************************************************ * Function ID: nSetEvent * * Description: * * 1、 * * Input Param: * * recEvent *rEvent * * Output Param: * * 无 * * Return: * * 0 - 成功 * * -1 - 失败 * ************************************************************************/int nSetEvent(recEvent *rEvent);/************************************************************************ * Function ID: nDestroyEvent * * Description: * * 1、 * * Input Param: * * recEvent *rEvent * * Output Param: * * 无 * * Return: * * 0 - 成功 * * -1 - 失败 * ************************************************************************/int nDestroyEvent(recEvent *rEvent);#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -