comparison test/testsem.c @ 1615:d5298e8f22b3

Ugh, more 64-bit cleanup
author Sam Lantinga <slouken@libsdl.org>
date Fri, 31 Mar 2006 06:27:47 +0000
parents 1dd8bf30a109
children 14717b52abc0
comparison
equal deleted inserted replaced
1614:6162b8d921ce 1615:d5298e8f22b3
13 static SDL_sem *sem; 13 static SDL_sem *sem;
14 int alive = 1; 14 int alive = 1;
15 15
16 int ThreadFunc(void *data) 16 int ThreadFunc(void *data)
17 { 17 {
18 uintptr_t threadnum = (uintptr_t)data; 18 int threadnum = (int)(uintptr_t)data;
19 while ( alive ) { 19 while ( alive ) {
20 SDL_SemWait(sem); 20 SDL_SemWait(sem);
21 fprintf(stderr, "Thread number %d has got the semaphore (value = %d)!\n", threadnum, SDL_SemValue(sem)); 21 fprintf(stderr, "Thread number %d has got the semaphore (value = %d)!\n", threadnum, SDL_SemValue(sem));
22 SDL_Delay(200); 22 SDL_Delay(200);
23 SDL_SemPost(sem); 23 SDL_SemPost(sem);