aboutsummaryrefslogtreecommitdiffstats
path: root/src/thread (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'v0.19.x'Max Kellermann2015-01-061-6/+14
|\
| * thread/Name: disable pthread_setname_np() on NetBSDMax Kellermann2015-01-061-2/+6
| | | | | | | | | | | | | | 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.
| * thread/Name: enable FormatThreadName() with prctl()Max Kellermann2015-01-061-1/+5
| | | | | | | | | | | | 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.
| * thread/Name: indent preprocessor commandsMax Kellermann2015-01-061-3/+3
| |
* | Copyright year 2015Max Kellermann2015-01-015-5/+5
|/
* Merge tag 'v0.18.20' into v0.19.xMax Kellermann2014-12-081-2/+2
|\
| * thread/Id: drop "::" prefix before pthread function namesMax Kellermann2014-12-081-2/+2
| | | | | | | | | | | | 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).
* | Merge branch 'v0.18.x'Max Kellermann2014-09-242-6/+28
|\|
| * thread/Posix{Cond,Mutex}: don't ues PTHREAD_*_INITIALIZER on NetBSDMax Kellermann2014-09-132-0/+28
| | | | | | | | | | | | | | | | | | | | 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.
* | thread/{Mutex,Cond}: relicense to BSD-2Max Kellermann2014-07-026-38/+58
| |
* | thread/GLib{Mutex,Cond}: remove obsolete classesMax Kellermann2014-07-022-178/+0
| |
* | thread/Util: relicense to BSD-2Max Kellermann2014-05-311-15/+25
| |
* | thread/Thread: make the destructor non-virtualMax Kellermann2014-03-161-1/+1
| | | | | | | | | | The class does not have any virtual methods, and thus the (debug-only) destructor does not need to be virtual.
* | thread/Name: fall back to prctl()Max Kellermann2014-03-011-0/+4
| |
* | java: new helper library for the Android portMax Kellermann2014-03-011-0/+9
| |
* | Thread/Util: use __NR_ioprio_set instead of SYS_ioprio_setMax Kellermann2014-02-181-1/+1
| | | | | | | | Bionic doesn't have the SYS_* macros.
* | Thread/Util: make SCHED_RESET_ON_FORK optionalMax Kellermann2014-02-181-1/+7
| | | | | | | | | | Use it if it exists, but don't insist if the C library is poor (e.g. Bionic/Android).
* | thread/Posix{Mutex,Cond}: disable "constexpr" on AndroidMax Kellermann2014-02-182-2/+8
| | | | | | | | Bionic's pthread declarations are non-literal.
* | Main, OutputThread: increase kernel timer slack (Linux)Max Kellermann2014-01-301-0/+54
| | | | | | | | | | Allows the kernel to combine timer wakeups with other processes, reducing power usage.
* | thread/Name: implementation for Mac OS XMax Kellermann2014-01-281-0/+4
| | | | | | | | pthread_setname_np() doesn't have the "thread" argument on OS X.
* | thread/Name: set thread namesMax Kellermann2014-01-231-0/+51
| | | | | | | | For debugging.
* | thread/Util: set the SCHED_RESET_ON_FORK flag in SetThreadRealtime()Max Kellermann2014-01-231-1/+1
| |
* | OutputThread: use real-time priorityMax Kellermann2014-01-141-0/+13
| |
* | UpdateGlue: let the update thread run at "idle" priorityMax Kellermann2014-01-141-0/+72
| | | | | | | | | | | | The update thread should not affect the rest of the system, therefore set "idle" priority, and let it only run when nobody else is using the resources.
* | copyright year 2014Max Kellermann2014-01-135-5/+5
|/
* Thread/Thread: replacement library for GThreadMax Kellermann2013-10-172-0/+222
|
* thread/{Cond,Mutex}: use "class" instead of "typedef"Max Kellermann2013-10-172-5/+4
| | | | Allows forward-declaration.
* gcc.h: rename to Compiler.hMax Kellermann2013-10-151-1/+1
|
* thread/Id: new class replacing GThread pointersMax Kellermann2013-08-101-0/+99
| | | | Remove a GLib dependencies from class EventLoop and DatabaseLock.
* thread/Cond: add method timed_wait()Max Kellermann2013-04-172-2/+19
|
* thread/{Mutex,Cond}: new backend for WIN32Max Kellermann2013-01-114-4/+135
| | | | | | Use CRITICAL_SECTION and CONDITION_VARIABLE. This requires Windows Vista or newer. It fixes problems with GLib threading objects that were implicitly created by static constructors before g_thread_init().
* thread/Cond: new wrapper for pthread_cond_t or GCondMax Kellermann2013-01-105-0/+189
|
* thread/GLibMutex: new Mutex implementationMax Kellermann2013-01-102-19/+44
| | | | | Switch WIN32 to this implementation to be able to use condition variables, which is impossible with CriticalSection.
* thread/PosixMutex: fix indentMax Kellermann2013-01-101-13/+13
|
* thread/Mutex: don't use std::mutexMax Kellermann2013-01-072-8/+68
| | | | Use a custom pthread_mutex_t wrapper because std::mutex adds overhead.
* Mutex: new wrapper for std::mutex, replaces GMutexMax Kellermann2013-01-042-0/+117