20 #include <semaphore.h> 24 #define SEM_VALUE_MAX INT_MAX 25 namespace folly::portability::semaphore {
26 using sem_t =
struct sem_t_*;
27 int sem_init(sem_t*
s,
int shared,
unsigned int value);
28 int sem_destroy(sem_t*
s);
29 int sem_post(sem_t*
s);
30 int sem_trywait(sem_t*
s);
31 int sem_wait(sem_t*
s);
34 using namespace folly::portability::semaphore;
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)