- 06 Jul, 2018 1 commit
-
-
Max Kellermann authored
-
- 09 Feb, 2018 2 commits
-
-
Max Kellermann authored
There is a POSIX definition for sched_setscheduler(), but Linux does not implement that; instead of changing the process's scheduler, it only affects one thread. This has caused some confusion among application developers and C library developers. While glibc implements Linux semantics, Musl has made their sched_setscheduler() function an always-failing no-op, causing the error message "sched_setscheduler failed: Function not implemented". http://git.musl-libc.org/cgit/musl/commit/src/sched/sched_setscheduler.c?id=1e21e78bf7a5c24c217446d8760be7b7188711c2 Instead of relying on the C library which may be unreliable here, we now roll our own system call wrapper. Closes #218
-
Max Kellermann authored
Juse in cas glibc gets a wrapper for the system call which would then conflict with ours.
-
- 08 Jan, 2018 3 commits
-
-
Max Kellermann authored
This attribute shall be used only for IsInside() to make this safe against a race condition described in #188: > There is no requirement on the implementation that the ID of the > created thread be available before the newly created thread starts > executing. http://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_create.html): This means that on some pthread implementations (e.g. Haiku), the assert(thread.IsInside()) could fail. Closes #188
-
Max Kellermann authored
This method is only used inside assert().
-
Max Kellermann authored
-
- 07 Jan, 2018 3 commits
-
-
Max Kellermann authored
Use the "==" operator instead of pthread_equal(). This allows us to eliminate two boolean flags which are there to avoid race conditions, and made the thing so fragile that I got tons of (correct) thread sanitizer warnings.
-
Max Kellermann authored
-
Max Kellermann authored
-
- 04 Jan, 2018 1 commit
-
-
Max Kellermann authored
-
- 12 Dec, 2017 1 commit
-
-
Max Kellermann authored
Only _WIN32 is defined by the compiler, and WIN32 is not standardized and may be missing. Closes #169
-
- 04 Jun, 2017 1 commit
-
-
Max Kellermann authored
-
- 08 May, 2017 1 commit
-
-
Max Kellermann authored
This eliminates some overhead, because the compiler doesn't need to consider these functions throwing.
-
- 17 Jan, 2017 1 commit
-
-
Max Kellermann authored
-
- 03 Jan, 2017 4 commits
-
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
Make sure this deprecated API is not used.
-
Max Kellermann authored
We need purely RAII-style, and this is std::lock_guard.
-
- 29 Dec, 2016 2 commits
-
-
Max Kellermann authored
-
Max Kellermann authored
-
- 28 Dec, 2016 1 commit
-
-
Max Kellermann authored
-
- 19 Sep, 2016 1 commit
-
-
Christian Körner authored
pthread_cond_timedwait() in PosixCond.hxx:timed_wait(PosixMutex...) returns EINVAL, if ts.tv_nsec >= 1E9. In this case, it returns to early. Find attached a patch which fixes this. I chose a compare-subtraction method to keep ts.tv_nsec below 1E9. Another option would be ts.tv_sec += ts.tv_nsec / 1000000000; ts.tv_nsec %= 1000000000; But I guess this takes more time on some ARM processors, which don't support hardware division.
-
- 04 Sep, 2016 2 commits
-
-
Max Kellermann authored
-
Max Kellermann authored
Reduce header clutter.
-
- 17 Jun, 2016 2 commits
-
-
Max Kellermann authored
-
Max Kellermann authored
-
- 02 May, 2016 1 commit
-
-
Max Kellermann authored
-
- 01 Mar, 2016 1 commit
-
-
Max Kellermann authored
Apparently all other C libraries are not compatible with "constexpr". Those which are not will get a performance penalty, but at least they work at all.
-
- 26 Feb, 2016 1 commit
-
-
Max Kellermann authored
-
- 19 Feb, 2016 1 commit
-
-
Christian Halaszovich authored
This only applies to linux systems. Here, sched_setscheduler() is called to get realtime scheduling. With this patch, the return value of this function is now checked and a warning / error message is generated if it fails.
-
- 31 Dec, 2015 1 commit
-
-
Max Kellermann authored
-
- 25 Aug, 2015 2 commits
-
-
Max Kellermann authored
-
Max Kellermann authored
Apparently all other C libraries are not compatible with "constexpr". Those which are not will get a performance penalty, but at least they work at all.
-
- 21 Jan, 2015 1 commit
-
-
Max Kellermann authored
Caused a build failure with uClibc because snprintf() was not available.
-
- 06 Jan, 2015 3 commits
-
-
Max Kellermann authored
NetBSD's pthread_setname_np() prototype is incompatible with the rest of the world, and it requires to pass the string argument as a non-const pointer. Instead of working around this misdesign, I hereby disable the feature on NetBSD.
-
Max Kellermann authored
Add macro HAVE_THREAD_NAME which is set when any method to set the thread name is available. Use that macro in FormatThreadName() instead of just checking for HAVE_PTHREAD_SETNAME_NP.
-
Max Kellermann authored
-
- 01 Jan, 2015 1 commit
-
-
Max Kellermann authored
-
- 08 Dec, 2014 1 commit
-
-
Max Kellermann authored
The "::" to explicitly refer to the global namespace appeared like a good idea in C++, but it breaks with C libraries that implement standard functions using macros (e.g. musl).
-
- 13 Sep, 2014 1 commit
-
-
Max Kellermann authored
On NetBSD, PTHREAD_MUTEX_INITIALIZER and PTHREAD_COND_INITIALIZER are not compatible with C++11 "constexpr" (see Mantis ticket 0004110). As a workaround, don't ues "constexpr", and use the functions pthread_mutex_init(), pthread_mutex_destroy(), pthread_cond_init() and pthread_cond_destroy() instead. This adds some runtime overhead, but is portable to POSIX implementations that have awkward initializer macros.
-