test/testlock.c
changeset 1151 be9c9c8f6d53
parent 0 74212992fb08
child 1659 14717b52abc0
     1.1 --- a/test/testlock.c	Wed Sep 28 06:38:22 2005 +0000
     1.2 +++ b/test/testlock.c	Wed Sep 28 11:36:20 2005 +0000
     1.3 @@ -15,6 +15,15 @@
     1.4  static Uint32 mainthread;
     1.5  static SDL_Thread *threads[6];
     1.6  
     1.7 +/*
     1.8 + * SDL_Quit() shouldn't be used with atexit() directly because
     1.9 + *  calling conventions may differ...
    1.10 + */
    1.11 +static void SDL_Quit_Wrapper(void)
    1.12 +{
    1.13 +	SDL_Quit();
    1.14 +}
    1.15 +
    1.16  void printid(void)
    1.17  {
    1.18  	printf("Process %u:  exiting\n", SDL_ThreadID());
    1.19 @@ -68,7 +77,7 @@
    1.20  		fprintf(stderr, "%s\n", SDL_GetError());
    1.21  		exit(1);
    1.22  	}
    1.23 -	atexit(SDL_Quit);
    1.24 +	atexit(SDL_Quit_Wrapper);
    1.25  
    1.26  	if ( (mutex=SDL_CreateMutex()) == NULL ) {
    1.27  		fprintf(stderr, "Couldn't create mutex: %s\n", SDL_GetError());