attr = NULL; \
}
+#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#define HC_API_CALL __stdcall
+#else
+#define HC_API_CALL
+#endif
+
static uint default_benchmark_algorithms[NUM_DEFAULT_BENCHMARK_ALGORITHMS] =
{
900,
// wrapper around mymalloc for ADL
#if defined(HAVE_HWMON)
-void *__stdcall ADL_Main_Memory_Alloc (const int iSize)
+void *HC_API_CALL ADL_Main_Memory_Alloc (const int iSize)
{
return mymalloc (iSize);
}
}
}
- data.devices_status = STATUS_RUNNING;
-
- if (initial_restore_done == 0)
- {
- if (data.restore_disable == 0) cycle_restore ();
-
- initial_restore_done = 1;
- }
-
- hc_timer_set (&data.timer_running);
-
- if ((wordlist_mode == WL_MODE_FILE) || (wordlist_mode == WL_MODE_MASK))
- {
- if ((quiet == 0) && (status == 0) && (benchmark == 0))
- {
- if (quiet == 0) fprintf (stdout, "%s", PROMPT);
- if (quiet == 0) fflush (stdout);
- }
- }
- else if (wordlist_mode == WL_MODE_STDIN)
- {
- if (data.quiet == 0) log_info ("Starting attack in stdin mode...");
- if (data.quiet == 0) log_info ("");
- }
-
/**
* create autotune threads
*/
+ data.devices_status = STATUS_AUTOTUNE;
+
hc_thread_t *c_threads = (hc_thread_t *) mycalloc (data.devices_cnt, sizeof (hc_thread_t));
for (uint device_id = 0; device_id < data.devices_cnt; device_id++)
* create cracker threads
*/
+ data.devices_status = STATUS_RUNNING;
+
+ if (initial_restore_done == 0)
+ {
+ if (data.restore_disable == 0) cycle_restore ();
+
+ initial_restore_done = 1;
+ }
+
+ hc_timer_set (&data.timer_running);
+
+ if ((wordlist_mode == WL_MODE_FILE) || (wordlist_mode == WL_MODE_MASK))
+ {
+ if ((quiet == 0) && (status == 0) && (benchmark == 0))
+ {
+ if (quiet == 0) fprintf (stdout, "%s", PROMPT);
+ if (quiet == 0) fflush (stdout);
+ }
+ }
+ else if (wordlist_mode == WL_MODE_STDIN)
+ {
+ if (data.quiet == 0) log_info ("Starting attack in stdin mode...");
+ if (data.quiet == 0) log_info ("");
+ }
+
time_t runtime_start;
time (&runtime_start);