Integrated Argon2 algo chukwa (TRTL) and wrkz (#258)
* Integrated embedded config parsing #245 * cleanup * Cleanup in remotelog * Fixed MS Visual Studio 2019 compatibility * Embedded config parsing only for miner not server * wip * Finished delete template * WIP * Integrated Argon2id/chukwa algo * Added chukwa-wrkz algo variant * Cleanup argon2-512 (chukwa/trtl) and argon2-256 (wrkz) parsing * WIP other argon2 coins * Cleanup and donate fix
This commit is contained in:
parent
78809d44bc
commit
dea9b975f8
160 changed files with 10341 additions and 151 deletions
36
src/3rdparty/argon2/lib/thread.c
vendored
Normal file
36
src/3rdparty/argon2/lib/thread.c
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
#include "thread.h"
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
int argon2_thread_create(argon2_thread_handle_t *handle,
|
||||
argon2_thread_func_t func, void *args) {
|
||||
if (NULL == handle || func == NULL) {
|
||||
return -1;
|
||||
}
|
||||
#if defined(_WIN32)
|
||||
*handle = _beginthreadex(NULL, 0, func, args, 0, NULL);
|
||||
return *handle != 0 ? 0 : -1;
|
||||
#else
|
||||
return pthread_create(handle, NULL, func, args);
|
||||
#endif
|
||||
}
|
||||
|
||||
int argon2_thread_join(argon2_thread_handle_t handle) {
|
||||
#if defined(_WIN32)
|
||||
if (WaitForSingleObject((HANDLE)handle, INFINITE) == WAIT_OBJECT_0) {
|
||||
return CloseHandle((HANDLE)handle) != 0 ? 0 : -1;
|
||||
}
|
||||
return -1;
|
||||
#else
|
||||
return pthread_join(handle, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
void argon2_thread_exit(void) {
|
||||
#if defined(_WIN32)
|
||||
_endthreadex(0);
|
||||
#else
|
||||
pthread_exit(NULL);
|
||||
#endif
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue