2 * Copyright (c) 2000-2008, Ingo Weinhold <ingo_weinhold@gmx.de>,
3 * Copyright (c) 2000-2008, Stephan Aßmus <superstippi@gmx.de>,
4 * All Rights Reserved. Distributed under the terms of the MIT license.
18 class EventQueue
: public BLocker
{
21 virtual ~EventQueue();
25 static EventQueue
* CreateDefault();
26 static void DeleteDefault();
27 static EventQueue
& Default();
29 void AddEvent(Event
* event
);
30 bool RemoveEvent(Event
* event
);
31 void ChangeEvent(Event
* event
,
35 void _AddEvent(Event
* event
);
36 Event
* _EventAt(int32 index
) const;
38 static int32
_execute_events_(void *cookie
);
39 int32
_ExecuteEvents();
43 thread_id fEventExecutor
;
44 sem_id fThreadControl
;
45 volatile bigtime_t fNextEventTime
;
47 static EventQueue
* fDefaultQueue
;
50 #endif // EVENT_QUEUE_H