Move affinity specific functions into their own source file

This commit is contained in:
jsteube
2016-09-07 11:16:31 +02:00
parent bcb1bfee86
commit 3ba5c743f8
6 changed files with 169 additions and 122 deletions
+29
View File
@@ -0,0 +1,29 @@
/**
* Author......: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#ifndef _AFFINITY_H
#define _AFFINITY_H
#include <stdlib.h>
#ifdef _POSIX
#include <pthread.h>
#endif // _POSIX
#ifdef _WIN
#include <windows.h>
#endif // _WIN
#ifdef __APPLE__
typedef struct cpu_set
{
uint32_t count;
} cpu_set_t;
#endif
void set_cpu_affinity (char *cpu_affinity);
#endif // _AFFINITY_H