diff options
author | Othmar Gsenger <otti@anytun.org> | 2009-01-12 21:41:30 +0000 |
---|---|---|
committer | Othmar Gsenger <otti@anytun.org> | 2009-01-12 21:41:30 +0000 |
commit | 33cad772126bd4b87249a3798b43edda59396e89 (patch) | |
tree | 2cc7862d0f66f3dd270a2e52208f333e166a981a /src/syncQueue.cpp | |
parent | moved rtp stuff to anyrtpproxy and removed it from anytun (diff) |
fixed anytun-nosync build target
Diffstat (limited to 'src/syncQueue.cpp')
-rw-r--r-- | src/syncQueue.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/syncQueue.cpp b/src/syncQueue.cpp index d90caaf..636107b 100644 --- a/src/syncQueue.cpp +++ b/src/syncQueue.cpp @@ -42,6 +42,21 @@ #include "syncQueue.h" +SyncQueue* SyncQueue::inst = NULL; +Mutex SyncQueue::instMutex; +SyncQueue& gSyncQueue = SyncQueue::instance(); + + +SyncQueue& SyncQueue::instance() +{ + Lock lock(instMutex); + static instanceCleaner c; + if(!inst) + inst = new SyncQueue(); + + return *inst; +} + void SyncQueue::push(const SyncCommand & scom ) { std::ostringstream sout; |