summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2015-06-20 23:45:15 +0200
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2015-06-28 01:36:53 +0200
commit2a36edfd86cc15829b113466845ccab759731793 (patch)
tree21cef3e088f5906df99f5d4832ed92df03723d12 /src/common
parentCommon: Fix string_util includes. (diff)
downloadyuzu-2a36edfd86cc15829b113466845ccab759731793.tar
yuzu-2a36edfd86cc15829b113466845ccab759731793.tar.gz
yuzu-2a36edfd86cc15829b113466845ccab759731793.tar.bz2
yuzu-2a36edfd86cc15829b113466845ccab759731793.tar.lz
yuzu-2a36edfd86cc15829b113466845ccab759731793.tar.xz
yuzu-2a36edfd86cc15829b113466845ccab759731793.tar.zst
yuzu-2a36edfd86cc15829b113466845ccab759731793.zip
Diffstat (limited to 'src/common')
-rw-r--r--src/common/thread.cpp17
-rw-r--r--src/common/thread.h16
2 files changed, 15 insertions, 18 deletions
diff --git a/src/common/thread.cpp b/src/common/thread.cpp
index 8bf005857..7bbf080bc 100644
--- a/src/common/thread.cpp
+++ b/src/common/thread.cpp
@@ -5,11 +5,20 @@
#include "common/thread.h"
#ifdef __APPLE__
-#include <mach/mach.h>
-#elif defined(BSD4_4) || defined(__OpenBSD__)
-#include <pthread_np.h>
+ #include <mach/mach.h>
#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
namespace Common
diff --git a/src/common/thread.h b/src/common/thread.h
index 7bc419497..8255ee6d3 100644
--- a/src/common/thread.h
+++ b/src/common/thread.h
@@ -4,24 +4,12 @@
#pragma once
-#include "common/common_types.h"
-#include <cstdio>
-#include <cstring>
+#include <cstddef>
#include <thread>
#include <condition_variable>
#include <mutex>
-// This may not be defined outside _WIN32
-#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
+#include "common/common_types.h"
// 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,