Howard Chu
2298595ea3
Free thread keys in reverse order of allocation
2007-01-25 11:13:15 +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
Howard Chu
5b8a74590b
Fix tpool_shutdown, don't remove pool from list since pool_destroy
...
already does it.
2006-04-29 22:31:58 +00:00
Hallvard Furuseth
da0c0360e4
Warnings: Unused vars. funcptr=0, not =NULL. if(b=...) -> if((b=...) != NULL).
2006-04-02 19:54:24 +00:00
Howard Chu
9870eba3ee
ITS#4368 unlock pool ltp_mutex before destroying it
2006-01-24 23:31:56 +00:00
Howard Chu
84315e96f8
ITS#4349 don't wait on condition if there are no threads in the pool.
2006-01-18 01:55:24 +00:00
Howard Chu
7f5ea4c098
Get rid of trivial yield, for completeness' sake.
2006-01-15 14:34:44 +00:00
Howard Chu
78a9d66e53
ITS#3950 delete gratuitous yield. (could use pthread_cond_timedwait
...
if we ever wanted to time out idle threads.)
2006-01-15 14:21:16 +00:00
Kurt Zeilenga
acbb5cf689
Happy new year!
2006-01-03 23:11:52 +00:00
Howard Chu
f80e9d11fa
Fix prev commit, spawns unnecessary threads.
2005-10-28 10:31:21 +00:00
Howard Chu
71514ffb92
Fix pool_submit, create threads as long as we're under the max count.
2005-10-27 21:55:18 +00:00
Pierangelo Masarati
d277c5b3d6
silence SLAP_SEM_LOAD_CONTROL related warnings...
2005-10-16 08:58:06 +00:00
Kurt Zeilenga
533394d641
disable SLAP_SEM_LOAD_CONTROL by default, needs additional review/work
...
Misc. other cleanup
2005-10-16 00:17:58 +00:00
Kurt Zeilenga
6db7e605ee
Align Operation buffers using LBER_ALIGNED_BUFFER
2005-10-12 23:17:28 +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
Pierangelo Masarati
6aa5b4f775
address ITS#3925; please test
2005-09-01 01:59:36 +00:00
Pierangelo Masarati
fe4b006e17
wait also if PAUSING; silence warnings and improve readability with gdb
2005-09-01 01:54:00 +00:00
Howard Chu
1f78e2b831
ITS#3961 better fix - provide a context for the main thread. The context
...
must be reset by the caller to clear out temp allocations etc.
2005-08-23 04:12:57 +00:00
Howard Chu
468112e2ba
ITS#3961 provide ldap_pvt_thread_pool_fake_context_init/destroy, don't
...
use arbitrary context pointers.
2005-08-23 03:25:21 +00:00
Howard Chu
6754d025f2
ITS#3847 silence warnings
2005-07-11 10:39:32 +00:00
Hallvard Furuseth
a20b19cc9e
ISO C chokes on comma at end of enum list
2005-07-06 08:13:50 +00:00
Howard Chu
3f20324ed0
Add ldap_pvt_thread_pool_purgekey to free all instances of key across
...
all threads.
2005-04-22 22:27:29 +00:00
Howard Chu
1b777e0ab3
Added ldap_pvt_thread_pool_pause/resume
2005-03-07 21:02:31 +00:00
Kurt Zeilenga
dc0eacd40b
Happy New Year!
2005-01-01 20:49:32 +00:00
Howard Chu
f3f78e8a1f
ITS#2997 change MAXTHREADS to LDAP_MAXTHR
2004-03-04 15:35:29 +00:00
Kurt Zeilenga
3c598e89fb
Happy new year
2004-01-01 19:15:16 +00:00
Kurt Zeilenga
159de0f135
Updated notices and acknowledgements
2003-11-26 07:16:36 +00:00
Jong Hyuk Choi
45776bff04
a runqueue for periodic thread execution (for syncrepl)
2003-05-07 02:06:01 +00:00
Howard Chu
a54549f1d5
Use pthread_equal to compare thread IDs
2003-05-02 12:23:31 +00:00
Howard Chu
30b3d741d5
Fix prev commit - hash bytes of ldap_pvt_thread_t to find proper slot
2003-04-13 05:48:48 +00:00
Howard Chu
a6a6946a67
New ldap_pvt_thread_pool_context()
2003-04-12 04:01:40 +00:00
Howard Chu
4a1eb51d3e
ITS#2404 keep the per-thread context in the individual threads...
2003-03-27 01:39:42 +00:00
Howard Chu
fabbbafde9
Don't spawn threads based on ltp_pending_count, it doesn't get decremented
...
right away due to ltp_mutex still being held. Just see if all open threads
are active... Use cond_broadcast to signal all waiting threads. Make sure
to remove correct ctx from active list after the thread returns.
2003-02-17 12:10:41 +00:00
Luke Howard
4a6c16b669
Don't free active thread list
2003-01-24 08:20:55 +00:00
Luke Howard
9490776d7b
Added ldap_pvt_thread_self() and ldap_pvt_thread_pool_context() API.
2003-01-24 06:49:13 +00:00
Kurt Zeilenga
6939c53170
Happy new year
2003-01-03 20:20:47 +00:00
Howard Chu
8c30114d84
Added thread-pool getkey/setkey functions
2002-08-24 05:39:43 +00:00
Kurt Zeilenga
771a131b0d
Fix unprotected list modification
2002-05-31 20:22:44 +00:00
Pierangelo Masarati
e8c5f59d84
ldap_int_thread_pool_wrapper was called with wrong prototype (ITS#1673)
...
================
Written by Hallvard B. Furuseth and placed into the public domain.
This software is not subject to any license of the University of Oslo.
================
ldap_int_thread_pool_wrapper() was defined with an parameter
struct ldap_int_thread_pool_s* but called with a void* argument.
Since these may have different representations, it can crash.
Hallvard B. Furuseth <h.b.furuseth@usit.uio.no>, March 2002.
2002-03-23 17:24:38 +00:00
Kurt Zeilenga
0e2af54a3f
Update copyright statements
2002-01-04 21:17:25 +00:00
Howard Chu
da00e5dac1
Use LDAP_FREE instead of free
2002-01-03 23:30:45 +00:00
Howard Chu
029306a5be
Use ldap_queue.h instead of <ac/queue.h>
2002-01-03 00:12:46 +00:00
Kurt Zeilenga
763c0de59b
Rework filter code
...
Misc cleanup / lint removal
2002-01-02 17:06:56 +00:00
Howard Chu
e823c74811
Fix typo
2001-12-31 12:37:45 +00:00
Howard Chu
9405761404
Moved free list to avoid additional mutex
2001-12-31 06:46:03 +00:00
Howard Chu
6e66d14311
Fix previous commit
2001-12-31 04:01:26 +00:00
Howard Chu
3e90c7dd42
Use queue-compat.h for queue management. Cache ctx structures on a free
...
list instead of always freeing them.
2001-12-31 03:05:56 +00:00
Kurt Zeilenga
ca975216b8
Regenerate configure and fix AC header inclusion
2001-12-18 02:25:21 +00:00