Mercurial > sdl-ios-xcode
comparison test/testsem.c @ 1769:290b5baf2fca
Fixed bug #215
The current SVN trunk is missing the SDLCALL specifier at numerous locations.
It has to be added for all (possibly user provided) callbacks.
I stumbled over this while creating a makefile for the OpenWatcom compiler for
Win32.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 07 May 2006 03:40:06 +0000 |
parents | d5298e8f22b3 |
children | 782fd950bd46 c121d94672cb 99acf3d856cb |
comparison
equal
deleted
inserted
replaced
1768:814f9f2c7a33 | 1769:290b5baf2fca |
---|---|
11 #define NUM_THREADS 10 | 11 #define NUM_THREADS 10 |
12 | 12 |
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 SDLCALL ThreadFunc(void *data) |
17 { | 17 { |
18 int threadnum = (int)(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)); |