From e063b906ab1f7853e263e03a7d174f83b85c431a Mon Sep 17 00:00:00 2001 From: jsteube Date: Thu, 15 Sep 2016 04:00:47 +0200 Subject: [PATCH] Move thread_autotune() to autotune.c --- include/autotune.h | 2 ++ src/autotune.c | 14 ++++++++++++++ src/hashcat.c | 12 ------------ 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/include/autotune.h b/include/autotune.h index c4bb68a42..8282e6174 100644 --- a/include/autotune.h +++ b/include/autotune.h @@ -10,4 +10,6 @@ int autotune (hc_device_param_t *device_param, hashconfig_t *hashconfig); +void *thread_autotune (void *p); + #endif // _AUTOTUNE_H diff --git a/src/autotune.c b/src/autotune.c index b173d2ad0..12bb0ff0f 100644 --- a/src/autotune.c +++ b/src/autotune.c @@ -309,3 +309,17 @@ int autotune (hc_device_param_t *device_param, hashconfig_t *hashconfig) return 0; } + +void *thread_autotune (void *p) +{ + hc_device_param_t *device_param = (hc_device_param_t *) p; + + if (device_param->skipped) return NULL; + + hashconfig_t *hashconfig = data.hashconfig; + + autotune (device_param, hashconfig); + + return NULL; +} + diff --git a/src/hashcat.c b/src/hashcat.c index 06938128a..ab36ad655 100644 --- a/src/hashcat.c +++ b/src/hashcat.c @@ -746,18 +746,6 @@ static void *thread_outfile_remove (void *p) return (p); } -static void *thread_autotune (void *p) -{ - hc_device_param_t *device_param = (hc_device_param_t *) p; - - if (device_param->skipped) return NULL; - - hashconfig_t *hashconfig = data.hashconfig; - - autotune (device_param, hashconfig); - - return NULL; -} static void *thread_calc_stdin (void *p) {