Home | History | Annotate | Download | only in platform

Lines Matching refs:semaphore

15 #include <mach/semaphore.h>  // NOLINT
17 #include <semaphore.h> // NOLINT
27 // Semaphore
29 // A semaphore object is a synchronization object that maintains a count. The
30 // count is decremented each time a thread completes a wait for the semaphore
31 // object and incremented each time a thread signals the semaphore. When the
32 // count reaches zero, threads waiting for the semaphore blocks until the
35 class V8_BASE_EXPORT Semaphore final {
37 explicit Semaphore(int count);
38 ~Semaphore();
40 // Increments the semaphore counter.
43 // Decrements the semaphore counter if it is positive, or blocks until it
49 // the semaphore counter is decremented and true is returned.
70 DISALLOW_COPY_AND_ASSIGN(Semaphore);
74 // POD Semaphore initialized lazily (i.e. the first time Pointer() is called).
76 // // The following semaphore starts at 0.
86 static Semaphore* Create() {
87 return new Semaphore(N);
93 typedef typename LazyDynamicInstance<Semaphore, CreateSemaphoreTrait<N>,