summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/threadutil.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2/threadutil.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/threadutil.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/noncore/multimedia/opieplayer2/threadutil.cpp b/noncore/multimedia/opieplayer2/threadutil.cpp
index a5cc92d..7a9e1a4 100644
--- a/noncore/multimedia/opieplayer2/threadutil.cpp
+++ b/noncore/multimedia/opieplayer2/threadutil.cpp
@@ -138,22 +138,22 @@ struct Thread::Data
138extern "C" 138extern "C"
139{ 139{
140 140
141void _threadutil_terminate_thread( void *arg ) 141static void terminate_thread( void *arg )
142{ 142{
143 Thread *thr = ( Thread* )arg; 143 Thread::Data *data = ( Thread::Data* )arg;
144 144
145 assert( thr ); 145 assert( data );
146 146
147 AutoLock locker( thr->d->guard ); 147 AutoLock locker( data->guard );
148 thr->d->isRunning = false; 148 data->isRunning = false;
149 thr->d->finishCondition.wakeAll(); 149 data->finishCondition.wakeAll();
150} 150}
151 151
152void *_threadutil_start_thread( void *arg ) 152void *_threadutil_start_thread( void *arg )
153{ 153{
154 Thread *thr = ( Thread* )arg; 154 Thread *thr = ( Thread* )arg;
155 155
156 pthread_cleanup_push( _threadutil_terminate_thread, thr ); 156 pthread_cleanup_push( terminate_thread, thr->d );
157 157
158 thr->d->isRunning = true; 158 thr->d->isRunning = true;
159 thr->run(); 159 thr->run();