Commit graph

302 commits

Author SHA1 Message Date
Michael Ploujnikov
151b0793ab Merge remote branch 'origin/master' 2010-01-14 19:31:42 -05:00
Michael Ploujnikov
f62513dea8 fix compilation errors 2010-01-14 16:46:27 -05:00
Christian Thaeter
aea546554b reworked sync.hpp using libraries locking functions 2010-01-14 21:15:13 +01: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
ecbcfdefd7 remote unnecessary calls to llist_unlink() insert is enough 2010-01-12 07:39:12 -05:00
Michael Ploujnikov
f890b35a03 continuation of working_list introduction 2010-01-11 15:04:52 -05:00
Michael Ploujnikov
925442b3d9 begin adding a second list to store working threads 2010-01-09 21:36:20 -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
4708326b77 Merge branch 'minor-fixes' into second-tp-attempt
Conflicts:
	src/backend/threadpool.c
	src/backend/threads.c
2010-01-07 18:27:09 -05:00
Michael Ploujnikov
30a46a6255 Merge remote branch 'public/minor-fixes' into minor-fixes
Conflicts:
	src/backend/threadpool.c
	src/backend/threadpool.h
	src/backend/threads.c
2010-01-07 18:24:25 -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
c707f94929 update c++ wrapper to match the C API 2010-01-06 07:42:42 -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
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
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
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
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
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
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
8c21f21acc namespace cleanup: bring Singleton and Factory into lib:: 2009-10-11 05:57:41 +02:00
9376bff71e race fixed, test pass 2009-10-11 05:57:40 +02:00
18c357eb4a start using Symbol datatype instead of a disguised char* 2009-10-11 05:57:38 +02:00
Christian Thaeter
f73cc47da6 Fix all things which broke compilation with NoBug 200909.1 2009-09-04 08:53:03 +02:00
37c0175bd1 fix crash on closing lumiera, in case of starting multiple threads 2009-06-19 00:45:08 +02:00
b6d22bb2e0 fix: condition for signalling thread termination is optional 2009-06-05 05:04:45 +02:00
e0ff915987 adapt thread-wrapper.hpp to backend thread API change 2009-06-05 05:00:53 +02:00
Christian Thaeter
dd9b7a174f Add reccondition to threads, make its functionality complete
With this the threads are now usable, despite still a mockup
implementation.

Some basic tests to show their use included.
2009-06-03 18:22:11 +02:00
8e5097cbe0 cleanup, fixes, comments... 2009-02-06 22:51:39 +01:00
5ebd0dcf5a WIP fix namespace 2009-02-01 01:01:44 +01:00
50625039d0 merge NoBug changes from master to bring this devel branch up-to-date
Next things to do will be reworking the draft/dummy to support multiple playback processes and a display callback
2009-01-25 02:10:03 +01:00
10597beeba mass rename: relocate basic Logging conf. from liblumieracommon to liblumiera 2009-01-25 00:24:42 +01:00
Christian Thaeter
65142d9cae WIP: deploy new logging flags in backend 2009-01-24 22:30:25 +01:00
c6bc14375c write a draft how I'd like to deal with joining threads. 2009-01-18 22:14:56 +01:00
2679156a9c Thread-wrapper: improve comments, push action down into private function 2009-01-18 22:14:56 +01:00
Christian Thaeter
bb8ad9fbd5 move threads back into the backend 2009-01-16 02:18:58 +01:00
Christian Thaeter
9665aa1df9 Apply log levels to existing errors 2009-01-15 01:05:07 +01:00
Christian Thaeter
d37bb17566 Add a context string to the error system
lumiera_error_set() now takes an optional extra string which can be used
to pass context relevant data along. This string gets copied into the
error state so one can easily create it by the tmpbuf_snprintf() facility.

Also a lot of places which define errors get fixed according to this.
2009-01-13 21:23:37 +01:00
5b68a39cc4 move threads from backend to liblumiera
otherwise lib and common would depend on backend
2009-01-10 21:50:03 +01:00
120fbf8f01 temporary addition: signalling successful thread creation
(I take it the final implementation will provide something equivalent,
without such a check, failure to create the thread results in deadlock)
2009-01-02 08:01:51 +01:00
Joel Holdsworth
70e6394cf6 Added a TODO next to ftruncate 2008-12-29 20:48:06 +00:00
Joel Holdsworth
1802512371 Reinstated -Werror and fixed the ftruncate warning 2008-12-29 20:41:47 +00:00
Joel Holdsworth
90d14d12f7 Merged in LUMIERA master and gui branches 2008-12-29 19:13:58 +00:00
Christian Thaeter
532f609ea1 experimental thread implementation
* This spawns a thread, almost as proposed
 * The condition variable for finishing is not yet implemented
 * Most Parameters are ignored
2008-12-29 01:50:38 +01:00
e921b1658c error.hpp belongs to src/lib 2008-12-27 00:53:35 +01:00
cbbc298fe9 kill some warnings 2008-12-26 23:17:51 +01:00
e0b698d25a additions to make threads.c compile (empty) 2008-12-26 22:27:47 +01:00
Christian Thaeter
c9d83d97c3 Moved the resourcecollector from backend to lib 2008-12-24 00:26:32 +01:00
Christian Thaeter
2126b25604 Flag to make thread jobs optional 2008-12-23 09:06:55 +01:00
Christian Thaeter
121599dc89 lowest level thread api proposal 2008-12-23 08:44:30 +01:00
Christian Thaeter
3363cfe8ba mixed fixes of small issues (compiler warnings) 2008-12-22 02:23:11 +01:00
a0a0e456a5 oops, merge with the other merge... 2008-12-21 07:38:26 +01:00
c8465a1a38 Merge latest GUI model additions 2008-12-21 07:10:46 +01:00
Joel Holdsworth
c536915b2e Corrected errors introduced by the merge 2008-12-20 15:55:46 +00:00
Joel Holdsworth
94a07a1464 Merge branch 'master' of git://git.lumiera.org/LUMIERA into gui
Conflicts:

	src/backend/Makefile.am
	src/gui/Makefile.am
	src/gui/gtk-lumiera.hpp
2008-12-20 15:03:24 +00:00
6d66476383 move config, interfaces and pluginsystem to liblumieracommon 2008-12-18 08:54:33 +01:00
7bde9aa538 start refactoring: liblumieracommon.so (application core services) 2008-12-18 08:12:40 +01:00
Christian Thaeter
3654473b75 WIP: Merge common into lib
* breaks lumigui linking
 * test non functional yet
 * tools cant not be linked because of cross dependency problems
2008-12-17 17:53:32 +01:00
Christian Thaeter
e2999d7af7 backend shared lib 2008-12-17 00:39:40 +01:00
Christian Thaeter
84339a0f87 moved the config system and interfaces/plugins back to lib
in preparation for the shared lib transistion doing next
2008-12-16 23:56:28 +01:00
Joel Holdsworth
081b630a9c Fixed some problems introduced during merging 2008-12-16 20:56:47 +00:00
Christian Thaeter
9a1a1890e2 post rebase fixes
tests are still broken and will be fixed for the shared lib transistion
2008-12-16 19:54:48 +01:00
45f18379b4 provide the missing parts for actually bringing up a (dummy) subsystem "GUI" 2008-12-15 13:36:42 +01:00
8c501a3d7c first rough draft implementation of calling through a layer separation interface 2008-12-15 13:36:41 +01:00
41f9f54907 pass compiler and starts OK without doing anything 2008-12-15 13:36:40 +01:00
01876fd576 add descriptive subsystem name string 2008-12-15 13:36:40 +01:00
3518235b57 Stub implementation of the various subsystem facades 2008-12-15 13:33:05 +01:00
628be502e5 reordered some files to use the new include and lumiera directories 2008-12-15 13:33:04 +01:00
Christian Thaeter
52a9c7fb27 lumiera is alive...
This starts the proposed changes in
http://www.pipapo.org/pipawiki/Lumiera/DesignProcess/ApplicationStructure

 * Moving all necessary files from src/backend to src/lumiera
 * create a small helloworld main app
 * setup the buildsystem to build it all
 * fix include paths at many places

The testsuite is not yet fixed here, that will be the next commit
2008-12-15 13:33:03 +01:00
Christian Thaeter
865398e59c cosmetics 2008-12-15 01:17:23 +01:00
Christian Thaeter
369c644ab4 Basic resourcecollector implementation
Lets one register callback functions which to incrementally cleanup unused
resources.
2008-12-15 01:17:23 +01:00