Renamed SDL_PostSemaphore() to SDL_SignalSemphore()

This commit is contained in:
Sam Lantinga committed 2024-07-24 13:37:40 -07:00
1 parent 27f86cbe18
commit a7c0192017
31 files changed
+66 -66

No files matched your search

+3 -3
View File
@@ -56,7 +56,7 @@ ThreadFuncRealWorld(void *data)
SDL_Log("Thread number %d has got the semaphore (value = %" SDL_PRIu32 ")!\n",
state->number, SDL_GetSemaphoreValue(sem));
SDL_Delay(200);
SDL_PostSemaphore(sem);
SDL_SignalSemaphore(sem);
SDL_Log("Thread number %d has released the semaphore (value = %" SDL_PRIu32 ")!\n",
state->number, SDL_GetSemaphoreValue(sem));
++state->loop_count;
@@ -145,7 +145,7 @@ TestOverheadUncontended(void)
start_ticks = SDL_GetTicks();
for (i = 0; i < NUM_OVERHEAD_OPS_MULT; i++) {
for (j = 0; j < NUM_OVERHEAD_OPS; j++) {
SDL_PostSemaphore(sem);
SDL_SignalSemaphore(sem);
}
for (j = 0; j < NUM_OVERHEAD_OPS; j++) {
SDL_WaitSemaphore(sem);
@@ -211,7 +211,7 @@ TestOverheadContended(SDL_bool try_wait)
start_ticks = SDL_GetTicks();
for (i = 0; i < NUM_OVERHEAD_OPS_MULT; i++) {
for (j = 0; j < NUM_OVERHEAD_OPS; j++) {
SDL_PostSemaphore(sem);
SDL_SignalSemaphore(sem);
}
/* Make sure threads consumed everything */
while (SDL_GetSemaphoreValue(sem)) {