headers/bsd: Add sys/queue.h.
[haiku.git] / src / system / kernel / listeners.cpp
blob61941ff120db35a7f585a36dba509949fca7bb4e
1 /*
2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
6 #include <listeners.h>
9 WaitObjectListenerList gWaitObjectListeners;
10 spinlock gWaitObjectListenerLock = B_SPINLOCK_INITIALIZER;
13 WaitObjectListener::~WaitObjectListener()
18 /*! Add the given wait object listener. gWaitObjectListenerLock lock must be
19 held.
21 void
22 add_wait_object_listener(struct WaitObjectListener* listener)
24 gWaitObjectListeners.Add(listener);
28 /*! Remove the given wait object listener. gWaitObjectListenerLock lock must be
29 held.
31 void
32 remove_wait_object_listener(struct WaitObjectListener* listener)
34 gWaitObjectListeners.Remove(listener);