- cancelation points defined

This commit is contained in:
Jan Hutter
2005-11-07 09:49:15 +00:00
parent 71888239b8
commit a01f6c5ac7
2 changed files with 12 additions and 0 deletions
+1
View File
@@ -82,6 +82,7 @@ static status_t get(private_job_queue_t *this, job_t **job)
/* add mutex unlock handler for cancellation, enable cancellation */
pthread_cleanup_push((void(*)(void*))pthread_mutex_unlock, (void*)&(this->mutex));
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &oldstate);
pthread_cond_wait( &(this->condvar), &(this->mutex));
/* reset cancellation, remove mutex-unlock handler (without executing) */