Commit Graph

19 Commits (1bf5a337a599e4be611711881a2b7fdf98baeb72)

Author SHA1 Message Date
Lioncash 1bf5a337a5 common/thread: Drop Hungarian notation on SetCurrentThreadName's parameter
This is inconsistent with our coding style.
Lioncash d6583d68f6 common/thread: Remove SleepCurrentThread()
This is also unused and superceded by standard functionality. The
standard library provides std::this_thread::sleep_for(), which provides
a much more flexible interface, as different time units can be used with
it.
Lioncash 1d555fdd25 common/thread: Remove unused CurrentThreadId()
This is an old function that's no longer necessary. C++11 introduced
proper threading support to the language and a thread ID can be
retrieved via std::this_thread::get_id() if it's ever needed.
Jannik Vogel 45d941d62e Support mingw cross-compile
Jan Beich 8ce1ec7ffa common: only FreeBSD has thread affinity compatible with Linux
src/common/thread.cpp:90:5: error: unknown type name 'cpu_set_t'; did you mean 'cpuset_t'?
    cpu_set_t cpu_set;
    ^~~~~~~~~
    cpuset_t
/usr/include/sys/_cpuset.h:48:24: note: 'cpuset_t' declared here
typedef struct _cpuset cpuset_t;
                       ^
1 error generated.
Jan Beich 1410bd3bd0 common: define routines to set thread name on more BSDs
src/common/thread.cpp:123:5: error: use of undeclared identifier 'pthread_setname_np'
    pthread_setname_np(pthread_self(), szThreadName);
    ^
1 error generated.
Emmanuel Gil Peyrot ebdae19fd2 Remove empty newlines in #include blocks.
This makes clang-format useful on those.

Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
Emmanuel Gil Peyrot dc8479928c Sources: Run clang-format on everything.
Emmanuel Gil Peyrot 2a36edfd86 Common: Cleanup thread includes.
darkf 5d10b212ec Fix MSVC-related #defines and add CMakeLists comment
darkf 8ba9ac0f74 Fix merge conflicts
purpasmart96 ebfd831ccb License change
darkf 459502e48c Fix MinGW build
Emmanuel Gil Peyrot f5d38649c7 Remove trailing spaces in every file but the ones imported from SkyEye, AOSP or generated
archshift 9d7cc2bedc common: Prune all redundant includes
archshift 498d1a37f1 Removed common/std_xyz, instead using the std header
Anthony J. Bentley dad3655a6d Use pthread_set_name_np() on OpenBSD.
bunnei de0a034a84 fixed project includes to use new directory structure
bunnei 63e46abdb8 got rid of 'src' folders in each sub-project