Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Suyu
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
many-archive
Suyu
Commits
2a36edfd
There was an error fetching the commit references. Please try again later.
Commit
2a36edfd
authored
9 years ago
by
Emmanuel Gil Peyrot
Browse files
Options
Downloads
Patches
Plain Diff
Common: Cleanup thread includes.
parent
13e68764
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/common/thread.cpp
+13
-4
13 additions, 4 deletions
src/common/thread.cpp
src/common/thread.h
+2
-14
2 additions, 14 deletions
src/common/thread.h
with
15 additions
and
18 deletions
src/common/thread.cpp
+
13
−
4
View file @
2a36edfd
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
src/common/thread.h
+
2
−
14
View file @
2a36edfd
...
...
@@ -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,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment