Lines Matching refs:impl_
211 pthread_mutex_lock(&worker->impl_->mutex_);
213 pthread_cond_wait(&worker->impl_->condition_, &worker->impl_->mutex_);
222 pthread_cond_signal(&worker->impl_->condition_);
223 pthread_mutex_unlock(&worker->impl_->mutex_);
234 if (worker->impl_ == NULL) return;
236 pthread_mutex_lock(&worker->impl_->mutex_);
240 pthread_cond_wait(&worker->impl_->condition_, &worker->impl_->mutex_);
245 pthread_cond_signal(&worker->impl_->condition_);
248 pthread_mutex_unlock(&worker->impl_->mutex_);
273 worker->impl_ = (WebPWorkerImpl*)WebPSafeCalloc(1, sizeof(*worker->impl_));
274 if (worker->impl_ == NULL) {
277 if (pthread_mutex_init(&worker->impl_->mutex_, NULL)) {
280 if (pthread_cond_init(&worker->impl_->condition_, NULL)) {
281 pthread_mutex_destroy(&worker->impl_->mutex_);
284 pthread_mutex_lock(&worker->impl_->mutex_);
285 ok = !pthread_create(&worker->impl_->thread_, NULL, ThreadLoop, worker);
287 pthread_mutex_unlock(&worker->impl_->mutex_);
289 pthread_mutex_destroy(&worker->impl_->mutex_);
290 pthread_cond_destroy(&worker->impl_->condition_);
292 WebPSafeFree(worker->impl_);
293 worker->impl_ = NULL;
322 if (worker->impl_ != NULL) {
324 pthread_join(worker->impl_->thread_, NULL);
325 pthread_mutex_destroy(&worker->impl_->mutex_);
326 pthread_cond_destroy(&worker->impl_->condition_);
327 WebPSafeFree(worker->impl_);
328 worker->impl_ = NULL;
332 assert(worker->impl_ == NULL);