Commit graph

2046 commits

Author SHA1 Message Date
Michael Ploujnikov
d78a826d39 Merge branch 'minor-fixes' into second-tp-attempt 2010-01-07 07:18:59 -05:00
Michael Ploujnikov
d989babc8a Merge remote branch 'ct/for_plouj2' into second-tp-attempt
Conflicts:
	src/backend/thread-wrapper.hpp
	src/backend/threadpool.c
	src/backend/threadpool.h
	src/backend/threads.c
2010-01-07 07:18:23 -05:00
Michael Ploujnikov
0b961b9784 Merge remote branch 'ct/for_plouj' into second-tp-attempt 2010-01-06 17:30:16 -05:00
Michael Ploujnikov
d8234db7b3 Merge remote branch 'ct/for_plouj2' into second-tp-attempt 2010-01-06 07:48:36 -05:00
Michael Ploujnikov
c707f94929 update c++ wrapper to match the C API 2010-01-06 07:42:42 -05:00
Michael Ploujnikov
a668095f60 ignore automake-related files in the m4 directory 2010-01-05 20:11:34 -05:00
Michael Ploujnikov
223e79cc4a replace mutex with condition variable in threadpool
use TRACE instead of ECHO
(based on cehteh's suggested code)
2010-01-04 17:03:47 -05:00
Michael Ploujnikov
7a507a0cee don't put threads in a detached state 2009-12-31 15:09:22 -05:00
Michael Ploujnikov
03fe6dd658 properly initialize and de-initialize the thread condition variable 2009-12-31 07:37:28 -05:00
Michael Ploujnikov
c4e1fdaf9a document lumiera_thread_destroy() and lumiera_thread_delete() 2009-12-31 07:32:55 -05:00
Michael Ploujnikov
ad404bd41a remove unused old code 2009-12-31 07:30:46 -05:00
Michael Ploujnikov
d63a6066a0 insert a space between the function name and the ( in each function call 2009-12-31 07:27:45 -05:00
Michael Ploujnikov
9c60d88c56 remove thread limiting logic from the threadpool 2009-12-31 07:24:07 -05:00
Michael Ploujnikov
69277b6770 remove unused function pool_thread_loop() 2009-12-31 07:18:29 -05:00
Christian Thaeter
a698128cfc new no-function test, sleep a bit before destroying the threadpool 2009-12-24 01:55:24 +01:00
Christian Thaeter
88195087d6 recondition to condition,
remove the mutex from the pool
rename park to release :P
2009-12-24 01:54:49 +01:00
Christian Thaeter
6b4415d8fa nobugify
declare and init the nobug flags and use them for logging diagnostics
2009-12-24 01:50:59 +01:00
Christian Thaeter
026fab07dc cosmetics, deadcode removal 2009-12-24 01:46:43 +01:00
Christian Thaeter
bddb23d111 remove threadpool_unlink()
thread removes itself from the list, this is trival in place
2009-12-24 01:45:44 +01:00
Michael Ploujnikov
6f5578ba10 fix a copy+paste mistake in LUMIERA_RECCONDITION_SECTION_CHAIN and add a test-case for it 2009-12-23 18:14:29 -05:00
Michael Ploujnikov
f2406c23a1 bork bork bork
by pulling this you agree to...
2009-12-23 13:10:31 -05:00
Michael Ploujnikov
24e87c815d remove old functions pthread_runner and lumiera_thread_run 2009-12-17 22:08:57 -05:00
Michael Ploujnikov
3999101f30 Merge branch 'for_plouj' of git://git.lumiera.org/lumiera/ct into second-tp-attempt 2009-12-17 21:31:23 -05:00
Christian Thaeter
d7db383134 Sectionlock needs a 'user' handle with new nobug 2009-12-18 03:14:47 +01:00
Michael Ploujnikov
547ff2b772 Merge branch 'for_plouj' of git://git.lumiera.org/lumiera/ct into second-tp-attempt 2009-12-16 22:36:38 -05:00
Christian Thaeter
5c7abbded9 Fix: race conditions with the nobug resource tracker
* requires new nobug version
* 40components.test "Type-based contexts" TypedCounter_test hangs
  for unknown reason, temporary disabled
2009-12-17 03:49:02 +01:00
Michael Ploujnikov
41bb8b7e78 make a TODO note about the finished condition variable 2009-12-03 09:29:56 -05:00
Michael Ploujnikov
098d801d00 give each thread pool a separate pthread_attr_t structure to configure 2009-12-02 22:21:49 -05:00
Michael Ploujnikov
afe135f43e add a lock around thread pool list access in lumiera_threadpool_release_thread() 2009-12-02 13:48:08 -05:00
Michael Ploujnikov
eedfafb0d0 convert lumiera_thread_state to using the enum string trick and use it in a test 2009-11-29 18:06:14 -05:00
Michael Ploujnikov
fc16de332f convert lumiera_thread_class to using the enum string trick and use it in a test 2009-11-29 17:55:20 -05:00
Michael Ploujnikov
98519c57da reduce the number of threads spawned in tests to avoid EAGAIN errors from pthread_create (at least on my 2.6.31.5-127.fc12.x86_64 Core2Duo T9600 system) 2009-11-27 11:39:23 -05:00
Michael Ploujnikov
c31bc2791b remove unnecessary REQUIREs based on my new understanding of nobug 2009-11-26 11:52:19 -05:00
Michael Ploujnikov
01223ef6ba kind vs class naming rationale 2009-11-26 11:45:34 -05:00
Michael Ploujnikov
afd2035983 rename threadpool.kind[i].pool to threadpool.kind[i].list
rename threadpool.kind to threadpool.pool
2009-11-26 11:27:50 -05:00
Michael Ploujnikov
99eb790027 rename LUMIERA_THREAD_* to LUMIERA_THREADCLASS_* in enum lumiera_thread_class 2009-11-26 11:21:31 -05:00
Michael Ploujnikov
52e9259e8b this was replaced with tests/backend/test-threadpool.c 2009-11-26 11:15:31 -05:00
Michael Ploujnikov
af80622ef5 begin implementing a 'soft' thread count limit per pool
add LUMIERA_DIE in cases where this soft limit is reached
add LUMIERA_DIE when pthread_create fails to create threads - serious
add a test which tries to break the soft limit
2009-11-26 10:24:18 -05:00
Michael Ploujnikov
bd076e4210 reduce the number of threads spawned in a test 2009-11-26 10:24:18 -05:00
Michael Ploujnikov
98c608d4c0 check that we're creating valid lumiera_thread_structures
die on pthread_create errors that we shouldn't be handling
2009-11-26 10:24:18 -05:00
Michael Ploujnikov
085216fd61 remove "allocated thread*" messages from lumiera_thread_new() and update tests 2009-11-26 10:24:17 -05:00
Michael Ploujnikov
07962b5314 add comments about locking in lumiera_threadpool_release_thread()
output the size of the created thread struct
don't print "destroying thread" (lets tests become shorter with repeated matching)
add a test which spans many threads in all pools
2009-11-26 10:24:17 -05:00
Michael Ploujnikov
8e3d4e7b7a fixed lumiera_threadpool_destroy() by using LLIST_FOREACH
added some checks to lumiera_threadpool_release_thread(), maybe too much
modified thread_loop() to return a known value - 0
added checks to lumiera_thread_new()
added a check to lumiera_thread_destroy()
made lumiera_thread_destroy() unlink the thread from a pool list
updated test case to match new debug messages
2009-11-26 10:24:17 -05:00
Michael Ploujnikov
d6d81f2e44 added lumiera_threadpool_destroy()
added locking and checks to lumiera_threadpool_acquire_thread()
added a nobug flag to threads.c
added lumiera_thread_destroy()
added lumiera_thread_delete()
2009-11-26 10:24:17 -05:00
Michael Ploujnikov
414b8b99c3 updated test passes
fixed problem with copying lists
2009-11-26 10:24:17 -05:00
Michael Ploujnikov
75696986e4 test passes 2009-11-26 10:24:17 -05:00
Michael Ploujnikov
10f79290a1 add lumiera_threadpool_release_thread
make the test compile
change from type to kind
2009-11-26 10:24:17 -05:00
Michael Ploujnikov
9dd838b129 acquire() test started, so far, everything just compiles 2009-11-26 10:24:17 -05:00
Michael Ploujnikov
775f6cbb5d actually create or use a thread struct, still not associated with a pthread 2009-11-26 10:24:17 -05:00
Michael Ploujnikov
00eb4eda46 partial code skeleton 2009-11-26 10:24:17 -05:00