semaphore.h

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

H
45
字号
/* *---------------------------------------------------------------------- *    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. * *---------------------------------------------------------------------- *//* *	semaphore.h *	Semaphore */#ifndef _SEMAPHORE_H_#define _SEMAPHORE_H_/* * Semaphore control block */typedef struct semaphore_control_block {	QUEUE	wait_queue;	/* Semaphore wait queue */	ID	semid;		/* Semaphore ID */	VP	exinf;		/* Extended information */	ATR	sematr;		/* Semaphore attribute */	INT	semcnt;		/* Semaphore current count value */	INT	maxsem;		/* Semaphore maximum count value */#if USE_OBJECT_NAME	UB	name[OBJECT_NAME_LENGTH];	/* name */#endif} SEMCB;IMPORT SEMCB knl_semcb_table[];	/* Semaphore control block */IMPORT QUEUE knl_free_semcb;	/* FreeQue */#define get_semcb(id)	( &knl_semcb_table[INDEX_SEM(id)] )#endif /* _SEMAPHORE_H_ */

⌨️ 快捷键说明

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