mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-12-03 21:30:11 -05:00
Move 3rd party libraries to "vendored" directory
This commit is contained in:
parent
b5b9ea2083
commit
c04ad45093
434 changed files with 17 additions and 14 deletions
|
|
@ -1,32 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <pthread.h>
|
||||
#ifdef __FreeBSD__
|
||||
#include <pthread_np.h>
|
||||
#endif
|
||||
#include <sched.h>
|
||||
|
||||
#include <set>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
|
||||
class CPU
|
||||
{
|
||||
public:
|
||||
typedef std::vector<pthread_t> ThreadIdVec;
|
||||
typedef std::vector<int> CPUVec;
|
||||
typedef std::unordered_map<int,int> CPU2CoreMap;
|
||||
typedef std::unordered_map<int,std::set<int>> Core2CPUsMap;
|
||||
|
||||
public:
|
||||
static int count();
|
||||
static int getaffinity(cpu_set_t *cpuset);
|
||||
static int setaffinity(const pthread_t thread_id, cpu_set_t *cpuset);
|
||||
static int setaffinity(const pthread_t thread_id, const int cpu);
|
||||
static int setaffinity(const pthread_t thread_id, const std::set<int> cpus);
|
||||
|
||||
static CPU::CPUVec cpus();
|
||||
static CPU::CPU2CoreMap cpu2core();
|
||||
static CPU::Core2CPUsMap core2cpus();
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue