tinyOS  v1.00
tEvent.h
Go to the documentation of this file.
1 
14 #ifndef TEVENT_H
15 #define TEVENT_H
16 
17 #include "tConfig.h"
18 #include "tLib.h"
19 #include "tTask.h"
20 
21 // Event类型
22 typedef enum _tEventType {
23  tEventTypeUnknown = (0 << 16),
24  tEventTypeSem = (1 << 16),
25  tEventTypeMbox = (2 << 16),
26  tEventTypeMemBlock = (3 << 16),
27  tEventTypeFlagGroup = (4 << 16),
28  tEventTypeMutex = (5 << 16),
29 } tEventType;
30 
31 // Event控制结构
32 typedef struct _tEvent {
35 } tEvent;
36 
37 void tEventInit (tEvent *event, tEventType type);
38 void tEventWait (tEvent *event, tTask *task, void *msg, uint32_t state, uint32_t timeout);
39 tTask *tEventWakeUp (tEvent *event, void *msg, uint32_t result);
40 void tEventWakeUpTask (tEvent *event, tTask *task, void *msg, uint32_t result);
41 void tEventRemoveTask (tTask *task, void *msg, uint32_t result);
42 uint32_t tEventRemoveAll (tEvent *event, void *msg, uint32_t result);
43 uint32_t tEventWaitCount (tEvent *event);
44 
45 #endif /* TEVENT_H */
46 
Definition: tTask.h:31
uint32_t tEventRemoveAll(tEvent *event, void *msg, uint32_t result)
Definition: tEvent.c:163
tList waitList
Definition: tEvent.h:34
tEventType type
Definition: tEvent.h:33
uint32_t tEventWaitCount(tEvent *event)
Definition: tEvent.c:206
Definition: tEvent.h:32
void tEventInit(tEvent *event, tEventType type)
Definition: tEvent.c:21
void tEventRemoveTask(tTask *task, void *msg, uint32_t result)
Definition: tEvent.c:138
enum _tEventType tEventType
void tEventWait(tEvent *event, tTask *task, void *msg, uint32_t state, uint32_t timeout)
Definition: tEvent.c:35
void tEventWakeUpTask(tEvent *event, tTask *task, void *msg, uint32_t result)
Definition: tEvent.c:109
_tEventType
Definition: tEvent.h:22
struct _tEvent tEvent
tTask * tEventWakeUp(tEvent *event, void *msg, uint32_t result)
Definition: tEvent.c:68
Definition: tLib.h:43