Move global mux_dispatcher variable into opencl_ctx_t
This commit is contained in:
@@ -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
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user