#pragma once #include "root.h" #if OS(WINDOWS) #include #elif OS(DARWIN) #include #include #else #include #endif namespace Bun { class Semaphore { public: Semaphore(unsigned int value); ~Semaphore(); bool signal(); bool wait(); private: #if OS(WINDOWS) uv_sem_t m_semaphore; #elif OS(DARWIN) semaphore_t m_semaphore; #else sem_t m_semaphore; #endif }; } // namespace Bun