diff --git a/src/misc.h b/src/misc.h index 1e4c91c5..4e9c0a12 100644 --- a/src/misc.h +++ b/src/misc.h @@ -28,7 +28,6 @@ #include "types.h" const std::string engine_info(bool to_uci = false); -void timed_wait(WaitCondition&, Lock&, int); void prefetch(char* addr); void start_logger(bool b); @@ -54,13 +53,6 @@ private: }; -enum SyncCout { IO_LOCK, IO_UNLOCK }; -std::ostream& operator<<(std::ostream&, SyncCout); - -#define sync_cout std::cout << IO_LOCK -#define sync_endl std::endl << IO_UNLOCK - - /// xorshift64star Pseudo-Random Number Generator /// This class is based on original code written and dedicated /// to the public domain by Sebastiano Vigna (2014). diff --git a/src/platform.h b/src/platform.h index 2248fd1d..22d3208e 100644 --- a/src/platform.h +++ b/src/platform.h @@ -32,24 +32,6 @@ inline int64_t system_time_to_msec() { return t.tv_sec * 1000LL + t.tv_usec / 1000; } -# include -typedef pthread_mutex_t Lock; -typedef pthread_cond_t WaitCondition; -typedef pthread_t NativeHandle; -typedef void*(*pt_start_fn)(void*); - -# define lock_init(x) pthread_mutex_init(&(x), NULL) -# define lock_grab(x) pthread_mutex_lock(&(x)) -# define lock_release(x) pthread_mutex_unlock(&(x)) -# define lock_destroy(x) pthread_mutex_destroy(&(x)) -# define cond_destroy(x) pthread_cond_destroy(&(x)) -# define cond_init(x) pthread_cond_init(&(x), NULL) -# 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,t) pthread_create(&(x),NULL,(pt_start_fn)f,t) -# define thread_join(x) pthread_join(x, NULL) - #else // Windows and MinGW #endif