sem.h

来自「pixil 最新的嵌入linux 應用程序集,別的地方很難下載」· C头文件 代码 · 共 22 行

H
22
字号
/* sem.h*/#define MWSEM_OK	0#define MWSEM_ERR	(-1)#define MWSEM_TIMEDOUT	1	/* time out while waiting on semaphore*/#define MWSEM_MAXWAIT	(~0)	/* timeout value to never time out*/typedef int	MWSEMAPHORE;		/* Sys V IPC semaphore ID*/#define GetServerSemaphore()	GdCreateSemaphore(1,1,1)#define GetClientSemaphore()	GdCreateSemaphore(1,0,0)#define LockRegion(id)		GdSemWait(id)#define UnlockRegion(id)	GdSemPost(id)MWSEMAPHORE	GdCreateSemaphore(int public, int create, int initial_value);void		GdDestroySemaphore(MWSEMAPHORE id);int		GdSemTryWait(MWSEMAPHORE id);int		GdSemWait(MWSEMAPHORE id);int		GdSemWaitTimeout(MWSEMAPHORE id, unsigned int timeout);int		GdSemValue(MWSEMAPHORE id);int		GdSemPost(MWSEMAPHORE id);

⌨️ 快捷键说明

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