| 123456789101112131415161718192021222324252627282930313233 |
- /************************************************************************
- * AUTHOR: NiuJiuRu
- * FILENAME: swsignal.h
- * DESCRIPTION: 信号量
- * NOTE: 主要用于状态通知
- * HISTORY:
- * 1, [2010-09-06] created by NiuJiuRu
- ***********************************************************************/
- #ifndef __SWSIGNAL_H__
- #define __SWSIGNAL_H__
- #ifdef __cplusplus
- extern "C"
- {
- #endif
- /* 创建信号量 */
- void *sw_signal_create();
- /* 销毁信号量 */
- void sw_signal_destroy(void *hSignal);
- /* 等待信号量, timeout(ms) = -1时表示无限等待 */
- int sw_signal_wait(void *hSignal, int timeout);
- /* 点亮信号量 */
- void sw_signal_give(void *hSignal);
- #ifdef __cplusplus
- }
- #endif
- #endif /* __SWSIGNAL_H__ */
|