2121
2222// includes
2323
24- #ifdef _MSC_VER
24+ #ifdef _WIN32
2525# include < windows.h>
2626#else
2727# include < cstring>
@@ -83,7 +83,7 @@ static void mutex_close ();
8383static void thread_create ();
8484static void thread_exit ();
8585
86- #ifdef _MSC_VER
86+ #ifdef _WIN32
8787static DWORD WINAPI thread_start (LPVOID id);
8888#else
8989static void * thread_start (void * id);
@@ -123,7 +123,7 @@ void smp_wakeup(void) {
123123 Thread[id].split_nb = 0 ;
124124 Thread[id].split_used = NULL ;
125125
126- #ifdef _MSC_VER
126+ #ifdef _WIN32
127127 SetEvent (Thread[id].wait );
128128#else
129129 pthread_cond_broadcast (&Thread[id].wait );
@@ -392,7 +392,7 @@ static void thread_create(void) {
392392 volatile int i;
393393 bool thread_is_ok;
394394
395- #ifndef _MSC_VER
395+ #ifndef _WIN32
396396 pthread_t pthread[1 ];
397397#endif
398398
@@ -404,7 +404,7 @@ static void thread_create(void) {
404404 Thread[i].split_used = NULL ;
405405 Thread[i].split_nb = 0 ;
406406
407- #ifdef _MSC_VER
407+ #ifdef _WIN32
408408 Thread[i].wait = CreateEvent (0 ,false ,false ,0 );
409409#else
410410 pthread_cond_init (&Thread[i].wait ,NULL );
@@ -415,7 +415,7 @@ static void thread_create(void) {
415415
416416 for (i = 1 ; i < ThreadMax; i++) { // no main thread
417417
418- #ifdef _MSC_VER
418+ #ifdef _WIN32
419419 thread_is_ok = (CreateThread (NULL ,0 ,thread_start,(LPVOID)(&i),0 ,NULL ) != NULL );
420420#else
421421 thread_is_ok = (pthread_create (pthread,NULL ,thread_start,(void *)(&i)) == 0 );
@@ -438,7 +438,7 @@ static void thread_exit(void) {
438438
439439 Thread[id].stage = STAGE_EXIT;
440440
441- #ifdef _MSC_VER
441+ #ifdef _WIN32
442442 SetEvent (Thread[id].wait );
443443#else
444444 pthread_cond_broadcast (&Thread[id].wait );
@@ -450,7 +450,7 @@ static void thread_exit(void) {
450450
451451// thread_start()
452452
453- #ifdef _MSC_VER
453+ #ifdef _WIN32
454454 static DWORD WINAPI thread_start (LPVOID id) {
455455#else
456456 static void * thread_start (void * id) {
@@ -486,7 +486,7 @@ static void thread_loop(int id, split_t * split) {
486486
487487 Thread[id].stage = STAGE_SLEEP;
488488
489- #ifdef _MSC_VER
489+ #ifdef _WIN32
490490 WaitForSingleObject (Thread[id].wait , INFINITE);
491491#else
492492 MUTEX_LOCK (SleepLock);
@@ -595,7 +595,7 @@ static void thread_update(const split_t * split, int old_alpha) {
595595
596596 if (best_move != MoveNone) {
597597
598- good_move (best_move,board,depth,split->height ,split->master ,best_value >=split-> beta );
598+ good_move (best_move,board,depth,split->height ,split->master );
599599
600600 if (best_value >= split->beta && !MOVE_IS_TACTICAL (best_move,board)) {
601601
0 commit comments