2016-09-07 11:16:31 +02:00
|
|
|
/**
|
2016-09-11 22:20:15 +02:00
|
|
|
* Author......: See docs/credits.txt
|
2016-09-07 11:16:31 +02:00
|
|
|
* License.....: MIT
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _AFFINITY_H
|
|
|
|
#define _AFFINITY_H
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
2016-09-07 11:42:05 +02:00
|
|
|
#include <stdarg.h>
|
2016-09-07 11:16:31 +02:00
|
|
|
|
2016-09-07 22:29:57 +02:00
|
|
|
#if defined (_POSIX)
|
2016-09-07 11:16:31 +02:00
|
|
|
#include <pthread.h>
|
2016-11-29 22:39:22 +01:00
|
|
|
#if defined (__linux__)
|
2016-09-07 11:24:21 +02:00
|
|
|
#include <sys/sysctl.h>
|
2016-11-29 22:39:22 +01:00
|
|
|
#endif // __linux__
|
2016-09-07 11:16:31 +02:00
|
|
|
#endif // _POSIX
|
|
|
|
|
2016-09-07 22:29:57 +02:00
|
|
|
#if defined (__APPLE__)
|
2016-09-07 11:24:21 +02:00
|
|
|
#include <mach-o/dyld.h>
|
|
|
|
#include <mach/mach.h>
|
2016-10-08 23:38:34 +02:00
|
|
|
#include <mach/thread_policy.h>
|
2016-09-07 11:24:21 +02:00
|
|
|
#endif // __APPLE__
|
|
|
|
|
2016-09-07 22:29:57 +02:00
|
|
|
#if defined (_WIN)
|
2016-09-07 11:16:31 +02:00
|
|
|
#include <windows.h>
|
|
|
|
#endif // _WIN
|
|
|
|
|
2016-10-08 23:38:34 +02:00
|
|
|
int set_cpu_affinity (hashcat_ctx_t *hashcat_ctx);
|
2016-09-07 11:16:31 +02:00
|
|
|
|
|
|
|
#endif // _AFFINITY_H
|