eventflag.h

来自「uT Kernel os source code for AT91」· C头文件 代码 · 共 57 行

H
57
字号
/* *---------------------------------------------------------------------- *    micro T-Kernel * *    Copyright (C) 2006-2007 by Ken Sakamura. All rights reserved. *    micro T-Kernel is distributed under the micro T-License. *---------------------------------------------------------------------- * *    Version:   1.00.00 *    Released by T-Engine Forum(http://www.t-engine.org) at 2007/03/26. * *---------------------------------------------------------------------- *//* *	eventflag.h *	Event Flag */#ifndef _EVENTFLAG_H_#define _EVENTFLAG_H_/* * Event flag control block */typedef struct eventflag_control_block {	QUEUE	wait_queue;	/* Event flag wait queue */	ID	flgid;		/* Event flag ID */	VP	exinf;		/* Extended information */	ATR	flgatr;		/* Event flag attribute */	UINT	flgptn;		/* Event flag current pattern */#if USE_OBJECT_NAME	UB	name[OBJECT_NAME_LENGTH];	/* name */#endif} FLGCB;IMPORT FLGCB knl_flgcb_table[];	/* Event flag control block */IMPORT QUEUE knl_free_flgcb;	/* FreeQue */#define get_flgcb(id)	( &knl_flgcb_table[INDEX_FLG(id)] )/* * Check for event flag wait release condition */Inline BOOL knl_eventflag_cond( FLGCB *flgcb, UINT waiptn, UINT wfmode ){	if ( (wfmode & TWF_ORW) != 0 ) {		return ( (flgcb->flgptn & waiptn) != 0 );	} else {		return ( (flgcb->flgptn & waiptn) == waiptn );	}}#endif /* _EVENTFLAG_H_ */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?