-
Notifications
You must be signed in to change notification settings - Fork 17
/
event.h
58 lines (49 loc) · 1.41 KB
/
event.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/********************************************************************/
/* Copyright (C) SSE-USTC, 2010 */
/* */
/* FILE NAME : event.h */
/* PRINCIPAL AUTHOR : Mengning */
/* SUBSYSTEM NAME : ChatSys */
/* MODULE NAME : ChatSys */
/* LANGUAGE : C */
/* TARGET ENVIRONMENT : ANY */
/* DATE OF FIRST RELEASE : 2010/12/03 */
/* DESCRIPTION : interface of Event ¡¤¡¤ */
/********************************************************************/
/*
* Revision log:
*
* Created by Mengning,2010/12/03
*
*/
#ifndef _EVENT_H_
#define _EVENT_H_
#include<semaphore.h>
/* Event typedefine */
typedef sem_t tEvent;
/*
* Initialize an Event
* input : tEvent *pEvent, Memory allocate outside
* input : Value (0)
* return : SUCCESS(0)/FAILURE(-1)
*
*/
int EventInit(tEvent *pEvent,int Value);
/*
* Shutdown an Event
* input : ...
*
*/
int EventShut(tEvent *pEvent);
/*
* ....
*
*/
int SentEvent(tEvent *pEvent);
/*
* ...
* return : SUCCESS(0)/FAILURE(-1)
*
*/
int WaitEvent(tEvent *pEvent);
#endif /* _EVENT_H_ */