summaryrefslogtreecommitdiffstats
path: root/mpeglib/lib/util/abstract
diff options
context:
space:
mode:
Diffstat (limited to 'mpeglib/lib/util/abstract')
-rw-r--r--mpeglib/lib/util/abstract/threadQueue.cpp16
-rw-r--r--mpeglib/lib/util/abstract/threadQueue.h4
2 files changed, 10 insertions, 10 deletions
diff --git a/mpeglib/lib/util/abstract/threadQueue.cpp b/mpeglib/lib/util/abstract/threadQueue.cpp
index fd8a4a39..1b130ba9 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_TQUEUE 5
+#define _MAX_THREAD_IN_QUEUE 5
#include <iostream>
@@ -37,9 +37,9 @@ WaitThreadEntry::~WaitThreadEntry() {
ThreadQueue::ThreadQueue() {
- waitThreadEntries=new WaitThreadEntry* [_MAX_THREAD_IN_TQUEUE];
+ waitThreadEntries=new WaitThreadEntry* [_MAX_THREAD_IN_QUEUE];
int i;
- for(i=0;i<_MAX_THREAD_IN_TQUEUE;i++) {
+ for(i=0;i<_MAX_THREAD_IN_QUEUE;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_TQUEUE;i++) {
+ for(i=0;i<_MAX_THREAD_IN_QUEUE;i++) {
delete waitThreadEntries[i];
}
delete [] waitThreadEntries;
@@ -73,14 +73,14 @@ void ThreadQueue::waitForExclusiveAccess() {
}
// wait
size++;
- if (size == _MAX_THREAD_IN_TQUEUE) {
- cout << "Aieee! ThreadQueue can only buffer:"<<_MAX_THREAD_IN_TQUEUE<<endl;
+ if (size == _MAX_THREAD_IN_QUEUE) {
+ cout << "Aieee! ThreadQueue can only buffer:"<<_MAX_THREAD_IN_QUEUE<<endl;
exit(0);
}
abs_thread_cond_t* waitCond=&(waitThreadEntries[insertPos]->waitCond);
insertPos++;
// wrap counter
- if (insertPos == _MAX_THREAD_IN_TQUEUE) {
+ if (insertPos == _MAX_THREAD_IN_QUEUE) {
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_TQUEUE) {
+ if (removePos == _MAX_THREAD_IN_QUEUE) {
removePos=0;
}
size--;
diff --git a/mpeglib/lib/util/abstract/threadQueue.h b/mpeglib/lib/util/abstract/threadQueue.h
index 765713b6..4c650e21 100644
--- a/mpeglib/lib/util/abstract/threadQueue.h
+++ b/mpeglib/lib/util/abstract/threadQueue.h
@@ -11,8 +11,8 @@
*/
-#ifndef __THREADTQUEUE_H
-#define __THREADTQUEUE_H
+#ifndef __THREADQUEUE_H
+#define __THREADQUEUE_H
#include "abs_thread.h"