RRenamed BX_CHECK to BX_ASSERT.

This commit is contained in:
Бранимир Караџић
2020-06-16 10:06:04 -07:00
parent 7bf14f0bac
commit f888abe8fb
16 changed files with 78 additions and 78 deletions

View File

@@ -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()