mirror of
https://github.com/oxen-io/oxen-core.git
synced 2023-12-14 02:22:56 +01:00
Silence warnings on Windows
This commit is contained in:
parent
6261ecb4e1
commit
8d22b01dca
|
@ -37,11 +37,12 @@
|
|||
HANDLE p = CreateMutex(NULL, FALSE, NULL); \
|
||||
if (InterlockedCompareExchangePointer((PVOID*)&x, (PVOID)p, NULL) != NULL) \
|
||||
CloseHandle(p); \
|
||||
} WaitForSingleObject(x, INFINITE) == WAIT_FAILED; } while(0)
|
||||
#define CTHR_MUTEX_UNLOCK(x) (ReleaseMutex(x) == 0)
|
||||
} WaitForSingleObject(x, INFINITE); } while(0)
|
||||
#define CTHR_MUTEX_UNLOCK(x) ReleaseMutex(x)
|
||||
#define CTHR_THREAD_TYPE HANDLE
|
||||
#define CTHR_THREAD_RTYPE void
|
||||
#define CTHR_THREAD_CREATE(thr, func, arg) thr = _beginthread(func, 0, arg)
|
||||
#define CTHR_THREAD_RETURN return
|
||||
#define CTHR_THREAD_CREATE(thr, func, arg) thr = (HANDLE)_beginthread(func, 0, arg)
|
||||
#define CTHR_THREAD_JOIN(thr) WaitForSingleObject(thr, INFINITE)
|
||||
#else
|
||||
#include <pthread.h>
|
||||
|
@ -51,6 +52,7 @@
|
|||
#define CTHR_MUTEX_UNLOCK(x) pthread_mutex_unlock(&x)
|
||||
#define CTHR_THREAD_TYPE pthread_t
|
||||
#define CTHR_THREAD_RTYPE void *
|
||||
#define CTHR_THREAD_RETURN return NULL
|
||||
#define CTHR_THREAD_CREATE(thr, func, arg) pthread_create(&thr, NULL, func, arg)
|
||||
#define CTHR_THREAD_JOIN(thr) pthread_join(thr, NULL)
|
||||
#endif
|
||||
|
|
|
@ -197,7 +197,7 @@ typedef struct seedinfo {
|
|||
static CTHR_THREAD_RTYPE rx_seedthread(void *arg) {
|
||||
seedinfo *si = arg;
|
||||
randomx_init_dataset(rx_dataset, si->si_cache, si->si_start, si->si_count);
|
||||
return NULL;
|
||||
CTHR_THREAD_RETURN;
|
||||
}
|
||||
|
||||
static void rx_initdata(randomx_cache *rs_cache, const int miners) {
|
||||
|
|
Loading…
Reference in a new issue