Move global mux_dispatcher variable into opencl_ctx_t

This commit is contained in:
jsteube
2016-09-20 13:18:47 +02:00
parent 4cde17aea7
commit 3adbf3d0d5
23 changed files with 46 additions and 43 deletions
-8
View File
@@ -16,14 +16,6 @@
#include <windows.h>
#endif // _WIN
#if defined (_WIN)
typedef HANDLE hc_thread_t;
typedef CRITICAL_SECTION hc_thread_mutex_t;
#elif defined (_POSIX)
typedef pthread_t hc_thread_t;
typedef pthread_mutex_t hc_thread_mutex_t;
#endif
#if defined (_WIN)
#define hc_thread_create(t,f,a) t = CreateThread (NULL, 0, (LPTHREAD_START_ROUTINE) &f, a, 0, NULL)
+14 -6
View File
@@ -45,12 +45,22 @@ typedef uint32_t uint; // we need to get rid of this sooner or later, for consis
// timer
#if defined (_WIN)
typedef LARGE_INTEGER hc_timer_t;
typedef LARGE_INTEGER hc_timer_t;
#elif defined (_POSIX)
typedef struct timeval hc_timer_t;
typedef struct timeval hc_timer_t;
#endif
// thread
#if defined (_WIN)
typedef HANDLE hc_thread_t;
typedef CRITICAL_SECTION hc_thread_mutex_t;
#elif defined (_POSIX)
typedef pthread_t hc_thread_t;
typedef pthread_mutex_t hc_thread_mutex_t;
#endif
// enums
typedef enum wl_mode
{
@@ -67,7 +77,6 @@ typedef enum hl_mode
} hl_mode_t;
typedef struct
{
char *file_name;
@@ -76,7 +85,6 @@ typedef struct
} outfile_data_t;
typedef enum attack_mode
{
ATTACK_MODE_STRAIGHT = 0,
@@ -526,6 +534,8 @@ typedef struct
int force_jit_compilation;
hc_thread_mutex_t mux_dispatcher;
} opencl_ctx_t;
#if defined (__APPLE__)
@@ -789,8 +799,6 @@ typedef struct
* threads
*/
opencl_ctx_t *opencl_ctx;
u32 shutdown_inner;