Lines Matching refs:waitables
239 std::vector<std::pair<WaitableEvent*, size_t> > waitables; in WaitMany() local
240 waitables.reserve(count); in WaitMany()
242 waitables.push_back(std::make_pair(raw_waitables[i], i)); in WaitMany()
244 DCHECK_EQ(count, waitables.size()); in WaitMany()
246 sort(waitables.begin(), waitables.end(), cmp_fst_addr); in WaitMany()
251 for (size_t i = 0; i < waitables.size() - 1; ++i) { in WaitMany()
252 DCHECK(waitables[i].first != waitables[i+1].first); in WaitMany()
257 const size_t r = EnqueueMany(&waitables[0], count, &sw); in WaitMany()
263 return waitables[count - r].second; in WaitMany()
271 waitables[count - (1 + i)].first->kernel_->lock_.Release(); in WaitMany()
322 (std::pair<WaitableEvent*, size_t>* waitables, in EnqueueMany() argument
327 waitables[0].first->kernel_->lock_.Acquire(); in EnqueueMany()
328 if (waitables[0].first->kernel_->signaled_) { in EnqueueMany()
329 if (!waitables[0].first->kernel_->manual_reset_) in EnqueueMany()
330 waitables[0].first->kernel_->signaled_ = false; in EnqueueMany()
331 waitables[0].first->kernel_->lock_.Release(); in EnqueueMany()
335 const size_t r = EnqueueMany(waitables + 1, count - 1, waiter); in EnqueueMany()
337 waitables[0].first->kernel_->lock_.Release(); in EnqueueMany()
339 waitables[0].first->Enqueue(waiter); in EnqueueMany()