proxygen
|
#include <Barrier.h>
Classes | |
struct | ControlBlock |
struct | ControlBlockAndPromise |
Public Member Functions | |
Barrier (uint32_t n) | |
~Barrier () | |
folly::Future< bool > | wait () |
Private Types | |
typedef folly::Promise< bool > | BoolPromise |
Private Member Functions | |
ControlBlock * | allocateControlBlock () |
void | freeControlBlock (ControlBlock *b) |
Static Private Member Functions | |
static BoolPromise * | promises (ControlBlock *cb) |
static size_t | controlBlockSize (size_t n) |
Private Attributes | |
uint32_t | size_ |
std::atomic< ControlBlock * > | controlBlock_ |
Static Private Attributes | |
static constexpr uint64_t | kReaderShift = 32 |
static constexpr uint64_t | kReader = uint64_t(1) << kReaderShift |
static constexpr uint64_t | kValueMask = kReader - 1 |
|
private |
|
explicit |
Definition at line 23 of file Barrier.cpp.
folly::futures::Barrier::~Barrier | ( | ) |
Definition at line 26 of file Barrier.cpp.
References controlBlock_, freeControlBlock(), i, kReaderShift, kValueMask, promises(), uint32_t, and val.
|
private |
Definition at line 41 of file Barrier.cpp.
References controlBlockSize(), i, promises(), size_, and uint32_t.
Referenced by controlBlockSize(), and wait().
|
inlinestaticprivate |
Definition at line 86 of file Barrier.h.
References allocateControlBlock(), b, freeControlBlock(), and promises().
Referenced by allocateControlBlock().
|
private |
Definition at line 64 of file Barrier.cpp.
References bm::free(), i, promises(), size_, and uint32_t.
Referenced by controlBlockSize(), wait(), and ~Barrier().
|
inlinestaticprivate |
Definition at line 82 of file Barrier.h.
Referenced by allocateControlBlock(), controlBlockSize(), freeControlBlock(), wait(), and ~Barrier().
folly::Future< bool > folly::futures::Barrier::wait | ( | ) |
Definition at line 72 of file Barrier.cpp.
References allocateControlBlock(), controlBlock_, freeControlBlock(), i, kReader, kValueMask, promises(), size_, uint32_t, and uint64_t.
Referenced by folly::futures::test::TEST(), TEST_F(), and TYPED_TEST().
|
private |
Definition at line 94 of file Barrier.h.
Referenced by wait(), and ~Barrier().
|
staticprivate |
|
staticprivate |
Definition at line 55 of file Barrier.h.
Referenced by ~Barrier().
Definition at line 57 of file Barrier.h.
Referenced by wait(), and ~Barrier().
|
private |
Definition at line 93 of file Barrier.h.
Referenced by allocateControlBlock(), freeControlBlock(), and wait().