diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 06:00:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 06:00:15 +0000 |
commit | b1057f437bf65300831a0ccb45b920787c6b318d (patch) | |
tree | f8a73db06ca1180d0da0ba6dfbe786197b4f4bc3 /mpeglib/lib/util/abstract | |
parent | 4ddfca384ced9ad654213aef9dc2c3973720b980 (diff) | |
download | tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.tar.gz tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.zip |
TQt4 port kdemultimedia
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1236079 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'mpeglib/lib/util/abstract')
-rw-r--r-- | mpeglib/lib/util/abstract/threadQueue.cpp | 16 | ||||
-rw-r--r-- | mpeglib/lib/util/abstract/threadQueue.h | 4 |
2 files changed, 10 insertions, 10 deletions
diff --git a/mpeglib/lib/util/abstract/threadQueue.cpp b/mpeglib/lib/util/abstract/threadQueue.cpp index 1b130ba9..fd8a4a39 100644 --- a/mpeglib/lib/util/abstract/threadQueue.cpp +++ b/mpeglib/lib/util/abstract/threadQueue.cpp @@ -12,7 +12,7 @@ #include "threadQueue.h" -#define _MAX_THREAD_IN_QUEUE 5 +#define _MAX_THREAD_IN_TQUEUE 5 #include <iostream> @@ -37,9 +37,9 @@ WaitThreadEntry::~WaitThreadEntry() { ThreadQueue::ThreadQueue() { - waitThreadEntries=new WaitThreadEntry* [_MAX_THREAD_IN_QUEUE]; + waitThreadEntries=new WaitThreadEntry* [_MAX_THREAD_IN_TQUEUE]; int i; - for(i=0;i<_MAX_THREAD_IN_QUEUE;i++) { + for(i=0;i<_MAX_THREAD_IN_TQUEUE;i++) { waitThreadEntries[i]=new WaitThreadEntry(); } abs_thread_mutex_init(&queueMut); @@ -56,7 +56,7 @@ ThreadQueue::~ThreadQueue() { exit(0); } int i; - for(i=0;i<_MAX_THREAD_IN_QUEUE;i++) { + for(i=0;i<_MAX_THREAD_IN_TQUEUE;i++) { delete waitThreadEntries[i]; } delete [] waitThreadEntries; @@ -73,14 +73,14 @@ void ThreadQueue::waitForExclusiveAccess() { } // wait size++; - if (size == _MAX_THREAD_IN_QUEUE) { - cout << "Aieee! ThreadQueue can only buffer:"<<_MAX_THREAD_IN_QUEUE<<endl; + if (size == _MAX_THREAD_IN_TQUEUE) { + cout << "Aieee! ThreadQueue can only buffer:"<<_MAX_THREAD_IN_TQUEUE<<endl; exit(0); } abs_thread_cond_t* waitCond=&(waitThreadEntries[insertPos]->waitCond); insertPos++; // wrap counter - if (insertPos == _MAX_THREAD_IN_QUEUE) { + if (insertPos == _MAX_THREAD_IN_TQUEUE) { insertPos=0; } abs_thread_cond_wait(waitCond,&queueMut); @@ -98,7 +98,7 @@ void ThreadQueue::releaseExclusiveAccess() { abs_thread_cond_t* waitCond=&(waitThreadEntries[removePos]->waitCond); removePos++; // wrap counter - if (removePos == _MAX_THREAD_IN_QUEUE) { + if (removePos == _MAX_THREAD_IN_TQUEUE) { removePos=0; } size--; diff --git a/mpeglib/lib/util/abstract/threadQueue.h b/mpeglib/lib/util/abstract/threadQueue.h index 4c650e21..765713b6 100644 --- a/mpeglib/lib/util/abstract/threadQueue.h +++ b/mpeglib/lib/util/abstract/threadQueue.h @@ -11,8 +11,8 @@ */ -#ifndef __THREADQUEUE_H -#define __THREADQUEUE_H +#ifndef __THREADTQUEUE_H +#define __THREADTQUEUE_H #include "abs_thread.h" |