test/torturethread.c
branchSDL-1.3
changeset 1659 14717b52abc0
parent 1618 3b08574f4c60
child 1662 782fd950bd46
child 1895 c121d94672cb
equal deleted inserted replaced
1658:e49147870aac 1659:14717b52abc0
    18 {
    18 {
    19 	SDL_Quit();
    19 	SDL_Quit();
    20 	exit(rc);
    20 	exit(rc);
    21 }
    21 }
    22 
    22 
    23 int SubThreadFunc(void *data) {
    23 int SDLCALL SubThreadFunc(void *data) {
    24 	while(! *(int volatile *)data) {
    24 	while(! *(int volatile *)data) {
    25 		; /*SDL_Delay(10);*/  /* do nothing */
    25 		; /*SDL_Delay(10);*/  /* do nothing */
    26 	}
    26 	}
    27 	return 0;
    27 	return 0;
    28 }
    28 }
    29 
    29 
    30 int ThreadFunc(void *data) {
    30 int SDLCALL ThreadFunc(void *data) {
    31 	SDL_Thread *sub_threads[NUMTHREADS];
    31 	SDL_Thread *sub_threads[NUMTHREADS];
    32 	int flags[NUMTHREADS];
    32 	int flags[NUMTHREADS];
    33 	int i;
    33 	int i;
    34 	int tid = (int)(uintptr_t)data;
    34 	int tid = (int)(uintptr_t)data;
    35 
    35