semaphore::semaphore(const semaphore& other) { i32 value = other.value(); #if defined(CRAP_PLATFORM_WIN) _semaphore = CreateSemaphore( 0, value, LMAXIMUMCOUNT, 0 ); #else sem_init( &_semaphore, 0, value ); #endif }
void semaphore::operator=( const semaphore& other ) { reset( other.value() ); }