X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=blobdiff_plain;f=folly%2Fdetail%2FFutex.h;fp=folly%2Fdetail%2FFutex.h;h=000bf1a62dcfad7ebfac2acdf1fc437307600498;hp=1e72b15ce14289a87909947c9423b11a83ea1199;hb=e229101b0e2fc1d9ccfbcb10be991cb62e19d32d;hpb=8bfee85eb0e54a346a8c2fe1ac8b474303b754b0 diff --git a/folly/detail/Futex.h b/folly/detail/Futex.h index 1e72b15c..000bf1a6 100644 --- a/folly/detail/Futex.h +++ b/folly/detail/Futex.h @@ -52,10 +52,10 @@ struct Futex : Atom, boost::noncopyable { /** Puts the thread to sleep if this->load() == expected. Returns true when * it is returning because it has consumed a wake() event, false for any * other return (signal, this->load() != expected, or spurious wakeup). */ - bool futexWait(uint32_t expected, uint32_t waitMask = -1) { + FutexResult futexWait(uint32_t expected, uint32_t waitMask = -1) { auto rv = futexWaitImpl(expected, nullptr, nullptr, waitMask); assert(rv != FutexResult::TIMEDOUT); - return rv == FutexResult::AWOKEN; + return rv; } /** Similar to futexWait but also accepts a deadline until when the wait call