Common: Cleanup thread includes.
This commit is contained in:
parent
13e6876463
commit
2a36edfd86
@ -5,11 +5,20 @@
|
|||||||
#include "common/thread.h"
|
#include "common/thread.h"
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#include <mach/mach.h>
|
#include <mach/mach.h>
|
||||||
#elif defined(BSD4_4) || defined(__OpenBSD__)
|
|
||||||
#include <pthread_np.h>
|
|
||||||
#elif defined(_WIN32)
|
#elif defined(_WIN32)
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
#else
|
||||||
|
#if defined(BSD4_4) || defined(__OpenBSD__)
|
||||||
|
#include <pthread_np.h>
|
||||||
|
#else
|
||||||
|
#include <pthread.h>
|
||||||
|
#endif
|
||||||
|
#include <sched.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _WIN32
|
||||||
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace Common
|
namespace Common
|
||||||
|
@ -4,24 +4,12 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/common_types.h"
|
#include <cstddef>
|
||||||
#include <cstdio>
|
|
||||||
#include <cstring>
|
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <condition_variable>
|
#include <condition_variable>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
|
||||||
// This may not be defined outside _WIN32
|
#include "common/common_types.h"
|
||||||
#ifndef _WIN32
|
|
||||||
#ifndef INFINITE
|
|
||||||
#define INFINITE 0xffffffff
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//for gettimeofday and struct time(spec|val)
|
|
||||||
#include <time.h>
|
|
||||||
#include <sys/time.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Support for C++11's thread_local keyword was surprisingly spotty in compilers until very
|
// Support for C++11's thread_local keyword was surprisingly spotty in compilers until very
|
||||||
// recently. Fortunately, thread local variables have been well supported for compilers for a while,
|
// recently. Fortunately, thread local variables have been well supported for compilers for a while,
|
||||||
|
Loading…
Reference in New Issue
Block a user