Lines Matching refs:impl_
37 pthread_mutex_lock(&worker->impl_->mutex_);
39 pthread_cond_wait(&worker->impl_->condition_, &worker->impl_->mutex_);
48 pthread_cond_signal(&worker->impl_->condition_);
49 pthread_mutex_unlock(&worker->impl_->mutex_);
60 if (worker->impl_ == NULL) return;
62 pthread_mutex_lock(&worker->impl_->mutex_);
66 pthread_cond_wait(&worker->impl_->condition_, &worker->impl_->mutex_);
71 pthread_cond_signal(&worker->impl_->condition_);
74 pthread_mutex_unlock(&worker->impl_->mutex_);
99 worker->impl_ = (VPxWorkerImpl*)vpx_calloc(1, sizeof(*worker->impl_));
100 if (worker->impl_ == NULL) {
103 if (pthread_mutex_init(&worker->impl_->mutex_, NULL)) {
106 if (pthread_cond_init(&worker->impl_->condition_, NULL)) {
107 pthread_mutex_destroy(&worker->impl_->mutex_);
110 pthread_mutex_lock(&worker->impl_->mutex_);
111 ok = !pthread_create(&worker->impl_->thread_, NULL, thread_loop, worker);
113 pthread_mutex_unlock(&worker->impl_->mutex_);
115 pthread_mutex_destroy(&worker->impl_->mutex_);
116 pthread_cond_destroy(&worker->impl_->condition_);
118 vpx_free(worker->impl_);
119 worker->impl_ = NULL;
148 if (worker->impl_ != NULL) {
150 pthread_join(worker->impl_->thread_, NULL);
151 pthread_mutex_destroy(&worker->impl_->mutex_);
152 pthread_cond_destroy(&worker->impl_->condition_);
153 vpx_free(worker->impl_);
154 worker->impl_ = NULL;
158 assert(worker->impl_ == NULL);