diff --git a/OpenCL/m17200_a0-pure.cl b/OpenCL/m17200_a0-pure.cl index 439bed6e3..507a94554 100644 --- a/OpenCL/m17200_a0-pure.cl +++ b/OpenCL/m17200_a0-pure.cl @@ -152,7 +152,7 @@ typedef struct pkzip pkzip_t; #pragma pack(pop) -CONSTANT_AS u32a crc32tab[256] = +CONSTANT_VK u32a crc32tab[256] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, diff --git a/OpenCL/m17200_a1-pure.cl b/OpenCL/m17200_a1-pure.cl index 2545c841e..cf0686d35 100644 --- a/OpenCL/m17200_a1-pure.cl +++ b/OpenCL/m17200_a1-pure.cl @@ -150,7 +150,7 @@ typedef struct pkzip pkzip_t; #pragma pack(pop) -CONSTANT_AS u32a crc32tab[256] = +CONSTANT_VK u32a crc32tab[256] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, diff --git a/OpenCL/m17200_a3-pure.cl b/OpenCL/m17200_a3-pure.cl index dc25cb2fa..4f07b6aff 100644 --- a/OpenCL/m17200_a3-pure.cl +++ b/OpenCL/m17200_a3-pure.cl @@ -150,7 +150,7 @@ typedef struct pkzip pkzip_t; #pragma pack(pop) -CONSTANT_AS u32a crc32tab[256] = +CONSTANT_VK u32a crc32tab[256] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, diff --git a/OpenCL/m17210_a0-pure.cl b/OpenCL/m17210_a0-pure.cl index ce4c36bd7..0f229bd93 100644 --- a/OpenCL/m17210_a0-pure.cl +++ b/OpenCL/m17210_a0-pure.cl @@ -152,7 +152,7 @@ typedef struct pkzip pkzip_t; #pragma pack(pop) -CONSTANT_AS u32a crc32tab[256] = +CONSTANT_VK u32a crc32tab[256] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, diff --git a/OpenCL/m17210_a1-pure.cl b/OpenCL/m17210_a1-pure.cl index 73bc005f6..61caf5f4d 100644 --- a/OpenCL/m17210_a1-pure.cl +++ b/OpenCL/m17210_a1-pure.cl @@ -150,7 +150,7 @@ typedef struct pkzip pkzip_t; #pragma pack(pop) -CONSTANT_AS u32a crc32tab[256] = +CONSTANT_VK u32a crc32tab[256] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, diff --git a/OpenCL/m17210_a3-pure.cl b/OpenCL/m17210_a3-pure.cl index c25227d98..6bfddf49e 100644 --- a/OpenCL/m17210_a3-pure.cl +++ b/OpenCL/m17210_a3-pure.cl @@ -150,7 +150,7 @@ typedef struct pkzip pkzip_t; #pragma pack(pop) -CONSTANT_AS u32a crc32tab[256] = +CONSTANT_VK u32a crc32tab[256] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, diff --git a/OpenCL/m17220_a0-pure.cl b/OpenCL/m17220_a0-pure.cl index 683d95a4d..1a7ec66b8 100644 --- a/OpenCL/m17220_a0-pure.cl +++ b/OpenCL/m17220_a0-pure.cl @@ -152,7 +152,7 @@ typedef struct pkzip pkzip_t; #pragma pack(pop) -CONSTANT_AS u32a crc32tab[256] = +CONSTANT_VK u32a crc32tab[256] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, diff --git a/OpenCL/m17220_a1-pure.cl b/OpenCL/m17220_a1-pure.cl index 6920f1047..e568be33d 100644 --- a/OpenCL/m17220_a1-pure.cl +++ b/OpenCL/m17220_a1-pure.cl @@ -150,7 +150,7 @@ typedef struct pkzip pkzip_t; #pragma pack(pop) -CONSTANT_AS u32a crc32tab[256] = +CONSTANT_VK u32a crc32tab[256] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, diff --git a/OpenCL/m17220_a3-pure.cl b/OpenCL/m17220_a3-pure.cl index 6e96380f0..439e4272f 100644 --- a/OpenCL/m17220_a3-pure.cl +++ b/OpenCL/m17220_a3-pure.cl @@ -150,7 +150,7 @@ typedef struct pkzip pkzip_t; #pragma pack(pop) -CONSTANT_AS u32a crc32tab[256] = +CONSTANT_VK u32a crc32tab[256] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, diff --git a/OpenCL/m17225_a0-pure.cl b/OpenCL/m17225_a0-pure.cl index af27eaf39..c7fd0e718 100644 --- a/OpenCL/m17225_a0-pure.cl +++ b/OpenCL/m17225_a0-pure.cl @@ -152,7 +152,7 @@ typedef struct pkzip pkzip_t; #pragma pack(pop) -CONSTANT_AS u32a crc32tab[256] = +CONSTANT_VK u32a crc32tab[256] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, diff --git a/OpenCL/m17225_a1-pure.cl b/OpenCL/m17225_a1-pure.cl index a172b7cc5..e141bf5ab 100644 --- a/OpenCL/m17225_a1-pure.cl +++ b/OpenCL/m17225_a1-pure.cl @@ -150,7 +150,7 @@ typedef struct pkzip pkzip_t; #pragma pack(pop) -CONSTANT_AS u32a crc32tab[256] = +CONSTANT_VK u32a crc32tab[256] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, diff --git a/OpenCL/m17225_a3-pure.cl b/OpenCL/m17225_a3-pure.cl index 533afac2a..ae31b02e7 100644 --- a/OpenCL/m17225_a3-pure.cl +++ b/OpenCL/m17225_a3-pure.cl @@ -150,7 +150,7 @@ typedef struct pkzip pkzip_t; #pragma pack(pop) -CONSTANT_AS u32a crc32tab[256] = +CONSTANT_VK u32a crc32tab[256] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, diff --git a/OpenCL/m17230_a0-pure.cl b/OpenCL/m17230_a0-pure.cl index 25eba47f2..9d7b23571 100644 --- a/OpenCL/m17230_a0-pure.cl +++ b/OpenCL/m17230_a0-pure.cl @@ -152,7 +152,7 @@ typedef struct pkzip pkzip_t; #pragma pack(pop) -CONSTANT_AS u32a crc32tab[256] = +CONSTANT_VK u32a crc32tab[256] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, diff --git a/OpenCL/m17230_a1-pure.cl b/OpenCL/m17230_a1-pure.cl index 0e6f406dc..c46102674 100644 --- a/OpenCL/m17230_a1-pure.cl +++ b/OpenCL/m17230_a1-pure.cl @@ -150,7 +150,7 @@ typedef struct pkzip pkzip_t; #pragma pack(pop) -CONSTANT_AS u32a crc32tab[256] = +CONSTANT_VK u32a crc32tab[256] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, diff --git a/OpenCL/m17230_a3-pure.cl b/OpenCL/m17230_a3-pure.cl index 1ff89243e..8c9d1b23a 100644 --- a/OpenCL/m17230_a3-pure.cl +++ b/OpenCL/m17230_a3-pure.cl @@ -150,7 +150,7 @@ typedef struct pkzip pkzip_t; #pragma pack(pop) -CONSTANT_AS u32a crc32tab[256] = +CONSTANT_VK u32a crc32tab[256] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, diff --git a/include/thread.h b/include/thread.h index 61a7447d9..fcd7e1e6c 100644 --- a/include/thread.h +++ b/include/thread.h @@ -22,17 +22,17 @@ #define hc_thread_exit(t) ExitThread (t) #define hc_thread_detach(t) CloseHandle (t) -/* +#define hc_thread_mutex_init(m) InitializeCriticalSection (&m) #define hc_thread_mutex_lock(m) EnterCriticalSection (&m) #define hc_thread_mutex_unlock(m) LeaveCriticalSection (&m) -#define hc_thread_mutex_init(m) InitializeCriticalSection (&m) #define hc_thread_mutex_delete(m) DeleteCriticalSection (&m) -*/ +/* #define hc_thread_mutex_init(m) m = CreateMutex (NULL, FALSE, NULL) #define hc_thread_mutex_lock(m) WaitForSingleObject (m, INFINITE) #define hc_thread_mutex_unlock(m) ReleaseMutex (m) #define hc_thread_mutex_delete(m) CloseHandle (m) +*/ #define hc_thread_sem_init(s) s = CreateSemaphore (NULL, 0, INT_MAX, NULL) #define hc_thread_sem_post(s) ReleaseSemaphore (s, 1, NULL) diff --git a/include/types.h b/include/types.h index 037e23d34..f68d3050c 100644 --- a/include/types.h +++ b/include/types.h @@ -81,13 +81,13 @@ typedef struct timespec hc_timer_t; #endif #if defined (_WIN) -typedef HANDLE hc_thread_t; -typedef HANDLE hc_thread_mutex_t; -typedef HANDLE hc_thread_semaphore_t; +typedef HANDLE hc_thread_t; +typedef CRITICAL_SECTION hc_thread_mutex_t; +typedef HANDLE hc_thread_semaphore_t; #else -typedef pthread_t hc_thread_t; -typedef pthread_mutex_t hc_thread_mutex_t; -typedef sem_t hc_thread_semaphore_t; +typedef pthread_t hc_thread_t; +typedef pthread_mutex_t hc_thread_mutex_t; +typedef sem_t hc_thread_semaphore_t; #endif // enums