Commit 6eb724522f7f1d35871089e229ac13005995a0c4

Authored by Georg Hopp
1 parent d0182d8f

EventDispatcher start and stop functionality

... ... @@ -64,12 +64,13 @@ void TR_eventDispatcherRegisterHandler(TR_EventDispatcher, TR_EventHandler);
64 64 void TR_eventDispatcherSetHeartbeat(TR_EventDispatcher, time_t);
65 65 time_t TR_eventDispatcherGetBeatTime(TR_EventDispatcher);
66 66 time_t TR_eventDispatcherGerDataWaitTime(TR_EventDispatcher);
67   -//void TR_eventDispatcherEnqueueEvent(TR_EventDispatcher, TR_Event);
68 67 void TR_eventDispatcherStart(TR_EventDispatcher);
69   -void TR_eventDispatcherStop(TR_EventDispatcher);
70 68 void TR_eventDispatcherShutdown(TR_EventDispatcher);
71 69
72   -#define TR_eventDispatcherEnqueueEvent(disp,ev) (TR_queuePut((disp)->events, (ev)))
  70 +#define TR_eventDispatcherEnqueueEvent(disp,ev) \
  71 + (TR_queuePut((disp)->events, (ev)))
  72 +#define TR_eventDispatcherStop(disp) \
  73 + (((TR_EventDispatcher)disp)->running = 0)
73 74
74 75 #endif // __TR_EVENT_DISPATCHER_H__
75 76
... ...
... ... @@ -9,6 +9,8 @@ TREVENT = event.c \
9 9 event_dispatcher_set_hearbeat.c \
10 10 event_dispatcher_get_beat_time.c \
11 11 event_dispatcher_get_data_wait_time.c \
  12 + event_dispatcher_start.c \
  13 + event_dispatcher_shutdown.c \
12 14 event_handler.c \
13 15 event_handler_handle_event.c \
14 16 event_handler_issue_event.c \
... ...
Please register or login to post a comment