diff options
| author | Wladimir J. van der Laan <[email protected]> | 2014-08-20 17:43:56 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2014-08-26 13:25:21 +0200 |
| commit | 610a8c075958aa95b97f62a7ab020a543694c23d (patch) | |
| tree | 8639401fd1aeeac4314c44552d4473c1f8652109 /src/compat.h | |
| parent | Remove unused function `ByteReverse` from util.h (diff) | |
| download | discoin-610a8c075958aa95b97f62a7ab020a543694c23d.tar.xz discoin-610a8c075958aa95b97f62a7ab020a543694c23d.zip | |
Move SetThreadPriority implementation to util.cpp instead of the header
Put the THREAD_* and PRIO_ constants in compat.h.
Diffstat (limited to 'src/compat.h')
| -rw-r--r-- | src/compat.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/compat.h b/src/compat.h index 52c781713..3f0a8b615 100644 --- a/src/compat.h +++ b/src/compat.h @@ -59,4 +59,15 @@ typedef u_int SOCKET; #define SOCKET_ERROR -1 #endif +#ifndef WIN32 +// PRIO_MAX is not defined on Solaris +#ifndef PRIO_MAX +#define PRIO_MAX 20 +#endif +#define THREAD_PRIORITY_LOWEST PRIO_MAX +#define THREAD_PRIORITY_BELOW_NORMAL 2 +#define THREAD_PRIORITY_NORMAL 0 +#define THREAD_PRIORITY_ABOVE_NORMAL (-2) +#endif + #endif // _BITCOIN_COMPAT_H |