diff options
Diffstat (limited to '3rdparty/bx/src/semaphore.cpp')
-rw-r--r-- | 3rdparty/bx/src/semaphore.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/3rdparty/bx/src/semaphore.cpp b/3rdparty/bx/src/semaphore.cpp index f4e99c66637..3e3083d3254 100644 --- a/3rdparty/bx/src/semaphore.cpp +++ b/3rdparty/bx/src/semaphore.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2010-2019 Branimir Karadzic. All rights reserved. + * Copyright 2010-2021 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -76,7 +76,7 @@ namespace bx SemaphoreInternal* si = (SemaphoreInternal*)m_internal; si->m_handle = dispatch_semaphore_create(0); - BX_CHECK(NULL != si->m_handle, "dispatch_semaphore_create failed."); + BX_ASSERT(NULL != si->m_handle, "dispatch_semaphore_create failed."); } Semaphore::~Semaphore() @@ -140,10 +140,10 @@ namespace bx int result; result = pthread_mutex_init(&si->m_mutex, NULL); - BX_CHECK(0 == result, "pthread_mutex_init %d", result); + BX_ASSERT(0 == result, "pthread_mutex_init %d", result); result = pthread_cond_init(&si->m_cond, NULL); - BX_CHECK(0 == result, "pthread_cond_init %d", result); + BX_ASSERT(0 == result, "pthread_cond_init %d", result); BX_UNUSED(result); } @@ -154,10 +154,10 @@ namespace bx int result; result = pthread_cond_destroy(&si->m_cond); - BX_CHECK(0 == result, "pthread_cond_destroy %d", result); + BX_ASSERT(0 == result, "pthread_cond_destroy %d", result); result = pthread_mutex_destroy(&si->m_mutex); - BX_CHECK(0 == result, "pthread_mutex_destroy %d", result); + BX_ASSERT(0 == result, "pthread_mutex_destroy %d", result); BX_UNUSED(result); } @@ -167,18 +167,18 @@ namespace bx SemaphoreInternal* si = (SemaphoreInternal*)m_internal; int result = pthread_mutex_lock(&si->m_mutex); - BX_CHECK(0 == result, "pthread_mutex_lock %d", result); + BX_ASSERT(0 == result, "pthread_mutex_lock %d", result); for (uint32_t ii = 0; ii < _count; ++ii) { result = pthread_cond_signal(&si->m_cond); - BX_CHECK(0 == result, "pthread_cond_signal %d", result); + BX_ASSERT(0 == result, "pthread_cond_signal %d", result); } si->m_count += _count; result = pthread_mutex_unlock(&si->m_mutex); - BX_CHECK(0 == result, "pthread_mutex_unlock %d", result); + BX_ASSERT(0 == result, "pthread_mutex_unlock %d", result); BX_UNUSED(result); } @@ -188,7 +188,7 @@ namespace bx SemaphoreInternal* si = (SemaphoreInternal*)m_internal; int result = pthread_mutex_lock(&si->m_mutex); - BX_CHECK(0 == result, "pthread_mutex_lock %d", result); + BX_ASSERT(0 == result, "pthread_mutex_lock %d", result); if (-1 == _msecs) { @@ -219,7 +219,7 @@ namespace bx } result = pthread_mutex_unlock(&si->m_mutex); - BX_CHECK(0 == result, "pthread_mutex_unlock %d", result); + BX_ASSERT(0 == result, "pthread_mutex_unlock %d", result); BX_UNUSED(result); @@ -240,7 +240,7 @@ namespace bx #else si->m_handle = CreateSemaphoreA(NULL, 0, LONG_MAX, NULL); #endif - BX_CHECK(NULL != si->m_handle, "Failed to create Semaphore!"); + BX_ASSERT(NULL != si->m_handle, "Failed to create Semaphore!"); } Semaphore::~Semaphore() |