mirror of
https://github.com/sockspls/badfish
synced 2025-05-02 09:39:36 +00:00
Further reduce platform.h
This commit is contained in:
parent
a0ef833174
commit
4b7ee6abe5
2 changed files with 0 additions and 26 deletions
|
@ -28,7 +28,6 @@
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
const std::string engine_info(bool to_uci = false);
|
const std::string engine_info(bool to_uci = false);
|
||||||
void timed_wait(WaitCondition&, Lock&, int);
|
|
||||||
void prefetch(char* addr);
|
void prefetch(char* addr);
|
||||||
void start_logger(bool b);
|
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
|
/// xorshift64star Pseudo-Random Number Generator
|
||||||
/// This class is based on original code written and dedicated
|
/// This class is based on original code written and dedicated
|
||||||
/// to the public domain by Sebastiano Vigna (2014).
|
/// to the public domain by Sebastiano Vigna (2014).
|
||||||
|
|
|
@ -32,24 +32,6 @@ inline int64_t system_time_to_msec() {
|
||||||
return t.tv_sec * 1000LL + t.tv_usec / 1000;
|
return t.tv_sec * 1000LL + t.tv_usec / 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
# include <pthread.h>
|
|
||||||
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
|
#else // Windows and MinGW
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue