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
Christian Thaeter
eba465998c
add some trace points to mmpcache
2008-12-15 01:17:23 +01:00
Christian Thaeter
db202e298e
mmap updates/refactoring
2008-12-15 01:17:23 +01:00
Christian Thaeter
9f497cdaa3
lumiera_file_chunksize_get() function
2008-12-15 01:17:23 +01:00
Christian Thaeter
430ec0bf8b
Fixed file initialization semantic (don't leak memory on error)
2008-12-15 01:17:23 +01:00
Christian Thaeter
a5119f8947
cosmetics and documentation in file.h, remove lumiera_file_descriptor()
2008-12-15 01:17:23 +01:00
Christian Thaeter
bb74bfbc22
fixup handle_acquire/_release for file and filedescriptor
2008-12-15 01:17:22 +01:00
Christian Thaeter
c2e2a0e525
some pending cosmetics, comments and checks
2008-12-15 01:17:22 +01:00
Christian Thaeter
da7fd1242b
move the mmapings nobug flag to backend.c
2008-12-15 01:17:22 +01:00
Christian Thaeter
408528d1e2
factor file-mmap chunksize setting out into its own function
2008-12-15 01:17:22 +01:00
Christian Thaeter
9d0985feb7
remove the refcounter from filedescriptor and use a list to attach files
2008-12-15 01:17:22 +01:00
Christian Thaeter
e953c3003b
Refactored filehandle/filehandlecache to use a normal init function
2008-12-15 01:17:22 +01:00
Christian Thaeter
e9cca69fb1
More things for the filedescriptor destructor
...
* truncate the file to its realsize
* destroy its mmapings
2008-12-15 01:17:21 +01:00
Christian Thaeter
a0cff36066
some smaller fixes in filedescriptor
...
* change mode for created files to 0666 (TODO: from config)
* some members where not properly initialized yet
* docing fixes
2008-12-15 01:17:21 +01:00
Christian Thaeter
208f7e2d76
Refactored filehandle acquisition to filehandle.c (duh!)
...
some old ad-hoc code slipped in which did that in file.c
2008-12-15 01:17:21 +01:00
Christian Thaeter
c88a2ffa1e
move mmapcache and filehandle nobug flags into backend.c
2008-12-15 01:17:21 +01:00
Christian Thaeter
219db59d82
renamed backend config entries
...
adding one level more, more descriptive
2008-12-15 01:17:21 +01:00
Christian Thaeter
5bbe80b370
preliminary use of the config system for some settings
...
* backend.filehandles maximum filehandles used
* backend.mmap_window_size mapping window start size
* backend.as_limit address space limit
This needs to be changed to use the lumieraorg_configuration interface.
2008-12-15 01:17:21 +01:00
Christian Thaeter
2a0b5dca5e
Fix: mutex initialization, remove explicit RESOURCE_HANDLES
...
The new mutex has an implicit resource handle
2008-12-15 01:17:21 +01:00
Christian Thaeter
e938b36071
WIP: mmap management first go
...
Quite some code which was hold back in favor of the config and plugin stuff
implements:
* mmapcache: mru cache for unused memory mappings
* mmap: single mmaped areas
* mmapings: manages mmaps established for one filedescriptor
2008-12-15 01:17:21 +01:00
Simeon Voelkel
8c2b98a2e1
re-indented and moved static functions to fit Lumiera's coding standard
2008-12-15 01:17:20 +01:00
Simeon Voelkel
f89708e117
split lumiera_configitem_parse into several smaller static functions
2008-12-15 01:17:20 +01:00
f13f851d77
error message when plugin.c is built without defining the plugin search path
...
(and btw... thanks for the hint ;-)
2008-11-07 23:10:08 +01:00
Christian Thaeter
aae3c8ed81
LUMIERA_PLUGIN is dead, long life LUMIERA_PLUGIN
...
removes the difference in compiled in and plugin interfaces.
* All interfaces are now defined with LUMIERA_EXPORT(...)
* The definition of LUMIERA_PLUGIN at compile time takes action to compile
as plugin which gets automatically managed.
* compiled in (core) interfaces need still be registered, this is
simplified with the LUMIERA_INTERFACE_REGISTEREXPORTED and
LUMIERA_INTERFACE_UNREGISTEREXPORTED macros which become no-ops for
plugins.
2008-11-06 05:23:47 +01:00
Christian Thaeter
c04f1e77d6
set LUMIERA_PLUGIN_PATH to $pkglibdir as default
2008-11-06 04:13:13 +01:00
Christian Thaeter
d5c61c0e9d
let plugin_discover() barf out when the plugin.path config cant be found
2008-11-05 11:33:49 +01:00
Christian Thaeter
fa6b6d54e9
hook the plugin refcounting in
...
The plugin refcounter is driven from interface opening/closing, this is
quite internal.
The 'last' time in plugin now records the last time the refcounter dropped
to 0, this is just sufficient enough to find out how long a plugin is
unused.
2008-11-05 11:33:29 +01:00
Christian Thaeter
7afce647fb
few tool functions for the plugin implementation
...
* plugin_name() to figure out the name of the plugin
* plugin_refinc() and plugin_refdec() to manage the refcount
2008-11-05 11:33:28 +01:00
Christian Thaeter
c26cd391b0
automatic plugin unloading at interfaceregistry_destroy()
...
All open plugins will be unloaded when the registry gets destroyed.
If there are still interfaces open, this will assert at ALPHA builds.
2008-11-05 11:33:28 +01:00