2bdf06829a
make thread(pool) less chatty
2011-12-24 05:48:51 +01:00
4a53ef4cd0
Clean-up: change some long standing TODOs into tickets
...
makes the test logs way more readable
Believe me: no one will ever notice a "TODO"
entry in the logs, when it showed up for
more than some months.
Thus I've created some new tickets, mostly
tagged as "QA" and placed the ticket number
at the corresponding locations in the source
2011-09-25 19:16:33 +02:00
3f1b7651e9
GPL header whitespace
2010-12-17 23:28:49 +01:00
Christian Thaeter
711af29605
Merge remote branch 'plouj/second-tp-attempt' into backend_devel
...
* plouj/second-tp-attempt:
added two sync tests
show the state name string
it is more proper to use cond_sync flags for *CONDITION_SECTIONs
add a threads/threadpool NOBUG flag hierarchy
replace an old test with a compile-only one which spawns way too many threads
increase the delay in threads to 10ms
wrap prime test in usleep() to make the thread likely to be re-scheduled
2010-02-03 10:51:03 +01:00
Michael Ploujnikov
6d053d3f84
show the state name string
2010-02-01 16:51:27 -05:00
Michael Ploujnikov
8588fa2b9c
it is more proper to use cond_sync flags for *CONDITION_SECTIONs
2010-02-01 07:25:49 -05:00
Michael Ploujnikov
b799321dff
add a threads/threadpool NOBUG flag hierarchy
...
and remove redundant/errorneous flag initializations as a result
also use the test flag from logging.h
2010-02-01 07:25:06 -05:00
Christian Thaeter
dc5ae73626
Log the error passing when joining threads
2010-01-30 07:20:09 +01:00
Christian Thaeter
f57d637b59
Merge commit 'dc87e78590ea86615d3ebe90d23af4548445b941' into backend_devel
...
* commit 'dc87e78590ea86615d3ebe90d23af4548445b941':
add a two-thread acquire test
show the state of the thread in question
minor fixes: remove an old comment and change another
fix the prime test algorithm
use unsigned long for even more digits!
2010-01-30 00:48:04 +01:00
Christian Thaeter
9fc68c9d32
Merge remote branch 'public/nobug201001.2' into backend_devel
...
* public/nobug201001.2:
integrating nobug context passing
updates for nobug 201001.2
Conflicts:
configure.ac
src/lib/condition.h
src/lib/reccondition.h
tests/backend/test-threads.c
2010-01-23 06:56:39 +01:00
Michael Ploujnikov
fc15a2ac2c
Merge commit '6f07e4eedc6b624b1f9ae1004ad3e6a77027e028' into second-tp-attempt
...
Conflicts:
src/backend/threads.c
2010-01-20 21:41:14 -05:00
Michael Ploujnikov
a22bb5e54f
show the state of the thread in question
2010-01-20 17:09:37 -05:00
Michael Ploujnikov
571c265ccd
minor fixes: remove an old comment and change another
2010-01-20 07:58:22 -05:00
Christian Thaeter
751a8b415c
few trace points
2010-01-20 01:04:35 +01:00
Christian Thaeter
6f07e4eedc
one more signal/wait for syncing
2010-01-20 01:04:12 +01:00
Christian Thaeter
12968bb784
thread kind and flag handling
...
* 256 states are enough for anyone (else fix the source)
* add proper masking and handling of flags
2010-01-20 00:43:11 +01:00
Christian Thaeter
32217debe8
Fix threadloop
...
* joining must be done inside the loop, doh
* a thread must release itself first in the loop, new threads
have to go idle when created
2010-01-20 00:33:08 +01:00
Christian Thaeter
66a0e6e0ca
Experiment: remove custom states, syncs are 2-thread barriers
2010-01-18 19:58:31 +01:00
Christian Thaeter
e2c5aceec4
FIX: off by one error in time normalization
...
"The value of the nanoseconds field must be in the range 0 to 999999999."
2010-01-18 18:45:02 +01:00
Christian Thaeter
7371db8a2c
thread deadlines, first implementation
2010-01-18 16:24:45 +01:00
Christian Thaeter
cc4dc25f4a
while loop is little more solid than do..while
2010-01-18 16:23:28 +01:00
Christian Thaeter
e55e648f29
Thread syncronization and joining
...
add a custom defined range for states
provide functions for barrier like syncing between 2 threads
provide joinable threads and a thread_join() function
2010-01-18 00:34:53 +01:00
Michael Ploujnikov
c78571be55
more formatting fixes to put spaces before function/macro call opening brackets
2010-01-16 13:53:42 -05:00
Michael Ploujnikov
02c9ee33c7
fix the code by re-merging some of cehteh's changes
...
test still fails
2010-01-16 11:48:48 -05:00
Michael Ploujnikov
e60c10a01d
remove redundant info from TRACE
...
and add spaces for formatting
2010-01-16 10:39:45 -05:00
Michael Ploujnikov
e9ae8c8601
add a thread state check and remove an old comment
2010-01-15 07:35:28 -05:00
Michael Ploujnikov
09fd15d5f8
die regardless of what type of failure pthread_create() encounters
2010-01-12 08:01:54 -05:00
Michael Ploujnikov
b49a5abff2
mark thread as worker
2010-01-12 07:47:28 -05:00
Michael Ploujnikov
f890b35a03
continuation of working_list introduction
2010-01-11 15:04:52 -05:00
Michael Ploujnikov
fd4504c9de
merge ECHO with TRACE
2010-01-08 16:38:35 -05:00
Michael Ploujnikov
56cf53adb3
fix compilation
2010-01-07 18:36:51 -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
03fe6dd658
properly initialize and de-initialize the thread condition variable
2009-12-31 07:37:28 -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
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
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
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
098d801d00
give each thread pool a separate pthread_attr_t structure to configure
2009-12-02 22:21:49 -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
c31bc2791b
remove unnecessary REQUIREs based on my new understanding of nobug
2009-11-26 11:52:19 -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
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