?? msgqueue.h
字號(hào):
/*
* Copyright (c) 2000-2008
* Author: Weiming Zhou
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation.
*/
#ifndef __MSGQUEUE_H__
#define __MSGQUEUE_H__
#ifdef __cplusplus
extern "C" {
#endif
typedef struct MSGQUEUE_st {
MTLIST *pList; /* 多任務(wù)鏈表 */
SEMAPHORE pSem; /* 處理隊(duì)列為空情況的計(jì)數(shù)信號(hào)量*/
INT nMaxLen; /* 隊(duì)列的最大長度 */
} MSGQUEUE;
MSGQUEUE * MsgQueue_Create(INT nMaxLen);
void MsgQueue_Destroy(MSGQUEUE *pQueue, DESTROYFUNC DestroyFunc);
INT MsgQueue_Send(MSGQUEUE *pQueue, void *pData);
void * MsgQueue_Recv(MSGQUEUE *pQueue);
void MsgQueue_EnumBegin(MSGQUEUE *pQueue);
INT MsgQueue_EnumNext(MSGQUEUE *pQueue, VISITFUNC VisitFunc);
#ifdef __cplusplus
}
#endif
#endif /* __MSGQUEUE_H__ */
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -