X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2Fdetail%2FFutex.h;h=de0c78f9bef0438c006af86eecf90a84477c40e9;hb=8893b8bcd26b41471e77c6882d77404c9a617176;hp=fe61d0e66417081fcc45c5a569b3b492acbf0306;hpb=d3ee675ff41cd36587ba8de41568050baa08eb3e;p=folly.git diff --git a/folly/detail/Futex.h b/folly/detail/Futex.h index fe61d0e6..de0c78f9 100644 --- a/folly/detail/Futex.h +++ b/folly/detail/Futex.h @@ -1,5 +1,5 @@ /* - * Copyright 2014 Facebook, Inc. + * Copyright 2013-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,19 +17,20 @@ #pragma once #include +#include #include #include -#include -#include -#include +#include + +#include namespace folly { namespace detail { enum class FutexResult { - VALUE_CHANGED, /* Futex value didn't match expected */ - AWOKEN, /* futex wait matched with a futex wake */ - INTERRUPTED, /* Spurious wake-up or signal caused futex wait failure */ - TIMEDOUT + VALUE_CHANGED, /* futex value didn't match expected */ + AWOKEN, /* wakeup by matching futex wake, or spurious wakeup */ + INTERRUPTED, /* wakeup by interrupting signal */ + TIMEDOUT, /* wakeup by expiring deadline */ }; /** @@ -42,60 +43,88 @@ enum class FutexResult { * (and benchmarks to back you up). */ template