Lines Matching refs:waitables
249 std::vector<std::pair<WaitableEvent*, size_t> > waitables; in WaitMany() local
250 waitables.reserve(count); in WaitMany()
252 waitables.push_back(std::make_pair(raw_waitables[i], i)); in WaitMany()
254 DCHECK_EQ(count, waitables.size()); in WaitMany()
256 sort(waitables.begin(), waitables.end(), cmp_fst_addr); in WaitMany()
261 for (size_t i = 0; i < waitables.size() - 1; ++i) { in WaitMany()
262 DCHECK(waitables[i].first != waitables[i+1].first); in WaitMany()
267 const size_t r = EnqueueMany(&waitables[0], count, &sw); in WaitMany()
271 return waitables[r].second; in WaitMany()
279 waitables[count - (1 + i)].first->kernel_->lock_.Release(); in WaitMany()
329 size_t WaitableEvent::EnqueueMany(std::pair<WaitableEvent*, size_t>* waitables, in EnqueueMany() argument
335 auto& kernel = waitables[i].first->kernel_; in EnqueueMany()
337 if (kernel->signaled_ && waitables[i].second < winner) { in EnqueueMany()
338 winner = waitables[i].second; in EnqueueMany()
347 waitables[i].first->Enqueue(waiter); in EnqueueMany()
353 for (auto* w = waitables + count - 1; w >= waitables; --w) { in EnqueueMany()