X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fplatform.h;fp=src%2Fplatform.h;h=f9739c69b5c1ce537636d66a0e88459d1d0ea76b;hp=26c3abfbb820d8bf999e7999b8214a7523c1689c;hb=553655eb073cdd59c726dd77fcf368d499029467;hpb=f01b53c37400e676fdf13d52323bc7bb65502e90 diff --git a/src/platform.h b/src/platform.h index 26c3abfb..f9739c69 100644 --- a/src/platform.h +++ b/src/platform.h @@ -65,7 +65,7 @@ typedef void*(*start_fn)(void*); # define cond_signal(x) pthread_cond_signal(&(x)) # define cond_wait(x,y) pthread_cond_wait(&(x),&(y)) # define cond_timedwait(x,y,z) pthread_cond_timedwait(&(x),&(y),z) -# define thread_create(x,f,id) !pthread_create(&(x),NULL,(start_fn)f,&(id)) +# define thread_create(x,f,t) !pthread_create(&(x),NULL,(start_fn)f,t) # define thread_join(x) pthread_join(x, NULL) #else // Windows and MinGW @@ -101,7 +101,7 @@ typedef HANDLE ThreadHandle; # define cond_signal(x) SetEvent(x) # define cond_wait(x,y) { lock_release(y); WaitForSingleObject(x, INFINITE); lock_grab(y); } # define cond_timedwait(x,y,z) { lock_release(y); WaitForSingleObject(x,z); lock_grab(y); } -# define thread_create(x,f,id) (x = CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)f,&(id),0,NULL), x != NULL) +# define thread_create(x,f,t) (x = CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)f,t,0,NULL), x != NULL) # define thread_join(x) { WaitForSingleObject(x, INFINITE); CloseHandle(x); } #endif