author | simon <simon> | 2002-12-11 11:05:52 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-11 11:05:52 (UTC) |
commit | dd7fcdf1589c8513055f6475d3a1f33075d971d8 (patch) (unidiff) | |
tree | 3b4927a023eea68d1c529b4852ce2cdd1801db49 /noncore/multimedia/opieplayer2 | |
parent | 616e7437498c7adcad77d9b79e9c450a75b260ca (diff) | |
download | opie-dd7fcdf1589c8513055f6475d3a1f33075d971d8.zip opie-dd7fcdf1589c8513055f6475d3a1f33075d971d8.tar.gz opie-dd7fcdf1589c8513055f6475d3a1f33075d971d8.tar.bz2 |
- gcc2 is not my friend, given that it can't deal with friend declarations
properly :) (a.k.a: make it compile with gcc2, step 2)
Diffstat (limited to 'noncore/multimedia/opieplayer2') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/threadutil.cpp | 17 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/threadutil.h | 6 |
2 files changed, 11 insertions, 12 deletions
diff --git a/noncore/multimedia/opieplayer2/threadutil.cpp b/noncore/multimedia/opieplayer2/threadutil.cpp index 7a9e1a4..ff38b1e 100644 --- a/noncore/multimedia/opieplayer2/threadutil.cpp +++ b/noncore/multimedia/opieplayer2/threadutil.cpp | |||
@@ -135,2 +135,6 @@ struct Thread::Data | |||
135 | WaitCondition finishCondition; | 135 | WaitCondition finishCondition; |
136 | |||
137 | Thread *thr; | ||
138 | |||
139 | void run() { thr->run(); } | ||
136 | }; | 140 | }; |
@@ -151,10 +155,10 @@ static void terminate_thread( void *arg ) | |||
151 | 155 | ||
152 | void *_threadutil_start_thread( void *arg ) | 156 | static void *start_thread( void *arg ) |
153 | { | 157 | { |
154 | Thread *thr = ( Thread* )arg; | 158 | Thread::Data *data = ( Thread::Data* )arg; |
155 | 159 | ||
156 | pthread_cleanup_push( terminate_thread, thr->d ); | 160 | pthread_cleanup_push( terminate_thread, data ); |
157 | 161 | ||
158 | thr->d->isRunning = true; | 162 | data->isRunning = true; |
159 | thr->run(); | 163 | data->run(); |
160 | 164 | ||
@@ -171,2 +175,3 @@ Thread::Thread() | |||
171 | { | 175 | { |
176 | d->thr = this; | ||
172 | } | 177 | } |
@@ -191,3 +196,3 @@ void Thread::start() | |||
191 | pthread_attr_setscope( &attributes, PTHREAD_SCOPE_SYSTEM ); | 196 | pthread_attr_setscope( &attributes, PTHREAD_SCOPE_SYSTEM ); |
192 | int err = pthread_create( &d->self, &attributes, _threadutil_start_thread, ( void* )this ); | 197 | int err = pthread_create( &d->self, &attributes, start_thread, ( void* )d ); |
193 | if ( err != 0 ) { | 198 | if ( err != 0 ) { |
diff --git a/noncore/multimedia/opieplayer2/threadutil.h b/noncore/multimedia/opieplayer2/threadutil.h index 21ae6b2..2fd0c68 100644 --- a/noncore/multimedia/opieplayer2/threadutil.h +++ b/noncore/multimedia/opieplayer2/threadutil.h | |||
@@ -28,7 +28,2 @@ class QSocketNotifier; | |||
28 | 28 | ||
29 | extern "C" | ||
30 | { | ||
31 | void *_threadutil_start_thread( void* ); | ||
32 | } | ||
33 | |||
34 | namespace ThreadUtil | 29 | namespace ThreadUtil |
@@ -90,3 +85,2 @@ namespace ThreadUtil | |||
90 | { | 85 | { |
91 | friend void *::_threadutil_start_thread( void* ); | ||
92 | public: | 86 | public: |