Rename MT functions, add tests, fix bugs

Renamed multithreaded related functions, added simple unit tests and fix
bugs caught by said tests :)
This commit is contained in:
2025-06-24 16:38:43 +03:00
parent 9212dbc7c2
commit 703fb0f240
15 changed files with 175 additions and 46 deletions

View File

@@ -39,7 +39,7 @@ int BH_MutexLock(BH_Mutex *mutex);
int BH_MutexUnlock(BH_Mutex *mutex);
int BH_MutexLockTry(BH_Mutex *mutex);
int BH_MutexTryLock(BH_Mutex *mutex);
BH_Semaphore *BH_SemaphoreNew(int value);
@@ -54,7 +54,7 @@ int BH_SemaphorePost(BH_Semaphore *semaphore);
int BH_SemaphoreWait(BH_Semaphore *semaphore);
int BH_SemaphoreWaitTry(BH_Semaphore *semaphore);
int BH_SemaphoreTryWait(BH_Semaphore *semaphore);
int BH_SemaphoreWaitFor(BH_Semaphore *semaphore,
@@ -85,7 +85,7 @@ int BH_ConditionBroadcast(BH_Condition *condition);
void BH_SpinlockLock(int *lock);
int BH_SpinlockLockTry(int *lock);
int BH_SpinlockTryLock(int *lock);
void BH_SpinlockUnlock(int *lock);