test/torturethread.c
changeset 1495 1dd8bf30a109
parent 1154 d93862a3d821
child 1615 d5298e8f22b3
equal deleted inserted replaced
1494:4da1926c287c 1495:1dd8bf30a109
    29 
    29 
    30 int ThreadFunc(void *data) {
    30 int 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 ) data;
    34 	uintptr_t tid = (uintptr_t)data;
    35 
    35 
    36 	fprintf(stderr, "Creating Thread %d\n", tid);
    36 	fprintf(stderr, "Creating Thread %d\n", tid);
    37 
    37 
    38 	for(i = 0; i < NUMTHREADS; i++) {
    38 	for(i = 0; i < NUMTHREADS; i++) {
    39 		flags[i] = 0;
    39 		flags[i] = 0;
    57 }
    57 }
    58 
    58 
    59 int main(int argc, char *argv[])
    59 int main(int argc, char *argv[])
    60 {
    60 {
    61 	SDL_Thread *threads[NUMTHREADS];
    61 	SDL_Thread *threads[NUMTHREADS];
    62 	int i;
    62 	uintptr_t i;
    63 
    63 
    64 	/* Load the SDL library */
    64 	/* Load the SDL library */
    65 	if ( SDL_Init(0) < 0 ) {
    65 	if ( SDL_Init(0) < 0 ) {
    66 		fprintf(stderr, "Couldn't initialize SDL: %s\n",SDL_GetError());
    66 		fprintf(stderr, "Couldn't initialize SDL: %s\n",SDL_GetError());
    67 		return(1);
    67 		return(1);