Commit Graph

97 Commits

Author SHA1 Message Date
Quanah Gibson-Mount
073232bbc7 Happy New Year! 2024-03-26 19:45:07 +00:00
Ondřej Kuzník
12bf5a95ba ITS#9045 rlock only if there may be other threads
We can't rlock if we've registered ourselves as a writer. We can only
figure that out by checking if we're the thread that initiated the
pause: is the server paused already?
2023-01-23 11:53:36 +00:00
Quanah Gibson-Mount
788e9592ba Happy New Year! 2022-01-07 18:40:00 +00:00
Howard Chu
5ad6ab3568 ITS#8958 rename ldap_pvt_thread_pool_pausecheck()
to ..._pausewait() since that's what it really does.
Add ..._pausequery() that only checks and doesn't wait.
2021-08-12 18:59:06 +00:00
Quanah Gibson-Mount
efaf9a4a17 Happy New Year! 2021-01-11 19:25:53 +00:00
Howard Chu
9d2f15307d ITS#7926 dynamic changes to olcListenerThreads
Reallocates sockets from old to new listener threads
2020-08-18 22:37:50 +01:00
Quanah Gibson-Mount
c06ac436e2 ITS#9235 Merge libldap_r into libldap 2020-07-03 17:23:14 -07:00
Quanah Gibson-Mount
f6ad222e41 Happy New Year! 2020-01-09 16:50:21 +00:00
Quanah Gibson-Mount
b45a6a7dc7 Happy New Year! 2019-01-14 18:46:16 +00:00
Ondřej Kuzník
0f44671c51 ITS#8772 Remove the local rmutex implementation 2018-10-19 13:08:10 +01:00
Ondřej Kuzník
7fa5eb4242 ITS#8772 Remove type distinction for recursive mutexes 2018-10-19 13:08:10 +01:00
Ondřej Kuzník
d4df939b95 ITS#8858 Introduce ldap_pvt_thread_pool_walk 2018-10-19 13:08:09 +01:00
Ondřej Kuzník
33aa4405e5 ITS#8850 Split ldap_pvt_thread_pool_destroy logic 2018-10-19 13:08:09 +01:00
Quanah Gibson-Mount
59e9ff6243 Happy New Year 2018-03-22 15:35:24 +00:00
Ondřej Kuzník
a8f01cc885 ITS#8638 Add a recursive mutex to libldap_r for libevent
Most thread implementations suppport a native recursive mutex, use that
where possible (especially when a regular mutex is recursive already).

Also provide a macro for applications to test whether they can use the
lock functions interchangeably.
2017-09-26 16:26:33 +01:00
Howard Chu
a336241e0e Add ldap_pvt_thread_pool_queues decl
Was missing from 0ef9e6107b
2017-04-09 15:35:05 +01:00
Howard Chu
e12ca8b6fe Fixes for multiple threadpool queues
Remove poolq_hash, it wasn't distributing work evenly to the queues.
Just walk through all queues and use the one with smallest
active+pending count. Since pool_retract also relied on the hash,
a different means of locating the thread to retract was needed.
Add pool_submit2 which returns the threadpool task structure,
and record which poolq this task lives on.
2017-03-15 11:13:09 +00:00
Quanah Gibson-Mount
1df85d3427 Happy New Year! 2017-01-03 12:36:47 -08:00
Quanah Gibson-Mount
6c4d6c880b Happy New Year! 2016-01-29 13:32:05 -06:00
Quanah Gibson-Mount
1705fa7e55 Happy New Year 2015-02-11 15:36:57 -06:00
Kurt Zeilenga
5c878c1bf2 Happy new year (belated) 2014-01-25 05:21:25 -08:00
Howard Chu
34f832faee Multiple queues per threadpool 2013-08-16 19:04:49 -07:00
Kurt Zeilenga
0fd1bf30b8 Happy New Year 2013-01-02 10:22:57 -08:00
Kurt Zeilenga
2bbf9804b9 Happy New Year! 2012-01-01 07:10:53 -08:00
Howard Chu
68ee165fb5 ITS#7115 blocked writers should not interfere with pool pause 2011-12-21 01:24:23 -08:00
Kurt Zeilenga
966cef8c9a Happy New Year 2011-01-05 00:42:37 +00:00
Hallvard Furuseth
7cb9c496bf ITS#6625 concurrency patch cleanup 2010-12-06 10:41:41 +00:00
Kurt Zeilenga
3dadeb3efe happy belated New Year 2010-04-13 22:17:29 +00:00
Howard Chu
23783a9164 Add ldap_pvt_thread_pool_retract() to cancel pending threads 2009-06-11 04:46:04 +00:00
Kurt Zeilenga
4af9eb9715 Update copyright notices 2009-01-22 00:40:04 +00:00
Hallvard Furuseth
47560a77c7 ITS#5824: #if/#elif issues in thread #includes 2008-11-21 05:03:53 +00:00
Howard Chu
a287573d2d ITS#5407 more checks for pool pausing 2008-03-08 23:51:07 +00:00
Hallvard Furuseth
5fca6c19c8 ITS#5364, thread pool efficiency:
Add ldap_pvt_thread_pool_pausing(): pause check for slapd without locking.
2008-02-10 16:24:28 +00:00
Kurt Zeilenga
c890c96d13 Happy New Year (belated) 2008-01-08 00:19:56 +00:00
Pierangelo Masarati
30f401c628 rename ldap_pvt_thread_pool_setkey_x() to ldap_pvt_thread_pool_setkey() (as part of ITS#5309) 2008-01-07 21:35:03 +00:00
Pierangelo Masarati
622c4d3884 new ldap_pvt_thread_pool_setkey API 2007-12-29 18:14:54 +00:00
Howard Chu
20c4e016fa Added native thread-specific data support 2007-10-25 06:42:40 +00:00
Howard Chu
a1a63bead0 ITS#4188 check for pool pause every 64 entries. (probably should make
this number tunable.)
2007-10-08 01:15:49 +00:00
Hallvard Furuseth
c60f7c1fd2 For ITS#4943: Axe thread pool semaphore code 2007-06-10 23:37:49 +00:00
Hallvard Furuseth
4a0d1a7dd1 Wrap enum in #ifndef LDAP_PVT_THREAD_H_DONE; this code can be read twice. 2007-01-11 13:43:52 +00:00
Kurt Zeilenga
da6d9eb046 happy new year 2007-01-02 20:00:42 +00:00
Pierangelo Masarati
67f3fd8078 monitor __ALL__ thread parameters 2006-09-14 18:55:02 +00:00
Howard Chu
f269301ab9 Add ldap_pvt_thread_pool_tid() 2006-05-02 00:56:42 +00:00
Hallvard Furuseth
5657a5e4f9 Fix typo in comment 2006-04-30 01:32:40 +00:00
Howard Chu
e1ec64aaee rmutex_lock etc.: caller supplies thread id 2006-04-28 21:39:38 +00:00
Howard Chu
0a7808fbad Added recursive mutex implementation 2006-04-28 20:12:45 +00:00
Pierangelo Masarati
cad751250e allow mutex ownership detection (thanks to Hallvard) 2006-04-01 19:00:37 +00:00
Kurt Zeilenga
acbb5cf689 Happy new year! 2006-01-03 23:11:52 +00:00
Pierangelo Masarati
d277c5b3d6 silence SLAP_SEM_LOAD_CONTROL related warnings... 2005-10-16 08:58:06 +00:00
Hallvard Furuseth
123948bd5e Add thread debugging wrapper thr_debug.c and ldap_thr_debug.h in libldap_r/,
enabled with LDAP_THREAD_DEBUG (cpp macro and environment variable):

Move any ldap_pvt_* definitions from ldap_int_thread.h to ldap_pvt_thread.h.
#define ldap_int_thread_equal/ldap_pvt_thread_equal instead of tpool.c:TID_EQ.
Define some ldap_debug_*_t types, and LDAP_UINTPTR_T, in ldap_int_thread.h.
ldap_int_thread.h/ldap_pvt_thread.h can now be included multiple times, giving
different results depending on whether libldap_r/ldap_thr_debug.h was included.
Add some cleanup and some preprocessor hacks.
#define LDAP_THREAD*_IMPLEMENTATION in libldap_r/*.c, used by ldap_thr_debug.h.
Add PTHREAD_MUTEX_ERRORCHECK/PTHREAD_MUTEX_ERRORCHECK_NP in thr_posix.c.
2005-09-17 23:28:08 +00:00