* 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!
This removes the explicit Sync things from the thread wraper since
the functionality is almost exactly provided by the backend.
Thread encapsulates a lumiera thread handle now, but this is strictly
optional and might be dropped on the floor (using a temporary as thread).
Thread has a sync() function which allows user controlled syncronous
startup:
Thread("foo", myoperation).sync();
will startup myoperation and only return from the ctor after myoperation
called a matching lumiera_thread_sync().
The related tests need to initialize/destroy the threadpool accordingly
counting the threads had a race when creating threads, with moving
threads only between idle and working list we don't need the counters for
operation anyways. Maybe later when we find out that we need them we can
re-add them in a sane way
adds a state to each threadpool which can be only offline or online.
One can not acquire new threads when the pool is offline.
no need for waits in the teststuite anymore.
add a custom defined range for states
provide functions for barrier like syncing between 2 threads
provide joinable threads and a thread_join() function
* plouj/second-tp-attempt: (68 commits)
partially fix a pkg-config problem with scons on Fedora12
fix comilation by using an existing TEST macro
more formatting fixes to put spaces before function/macro call opening brackets
add a stronger REQUIRE check
ignore RESOURCE_ANNOUNCE in tests
fix the code by re-merging some of cehteh's changes
remove redundant info from TRACE
match the filename in the header comment
add a thread state check and remove an old comment
python-2.6 fix: loading the icon_rener.py script (Ticket #222)
Use a fully qualified name for PlacementMO in PlacementIndex
fix compilation errors
die regardless of what type of failure pthread_create() encounters
mark thread as worker
remote unnecessary calls to llist_unlink() insert is enough
continuation of working_list introduction
begin adding a second list to store working threads
merge ECHO with TRACE
don't expect any more output from the basic test
fix compilation
...
Conflicts:
src/tool/Makefile.am
tests/Makefile.am
* refactor configure.ac to have distinct sections to configure each
subsystem.
* Dedicated LUMIERA_<subsys>_CFLAGS|_LIBS vars
* Fix Makefile.am's to use them, remove unnecessary dependencies
Stray dependencies to be refacored:
* tests/Makefile.am has dependencies on proc and backend
- should be moved to tests/library/Makefile.am etc anyways
* tests/lib/Makefile.am has dependency on GUI left
* src/tool/Makefile.am links GUI stuff generally, thats ok
* one threading test is broken, we don't care, merging new threadpool in
next.
This seems to satisfy g++ 4.4.2, which otherwise complains like this:
In file included from ../src/proc/mobject/session/session-impl.hpp:53,
from ../src/proc/mobject/session/sess-manager-impl.hpp:28,
from ../src/proc/mobject/session/sess-manager-impl.cpp:41:
../src/proc/mobject/session/placement-index.hpp:163: error:
declaration of ‘typedef class mobject::Placement<mobject::MObject,
mobject::MObject> mobject::session::PlacementIndex::PlacementMO’
../src/proc/mobject/placement.hpp:244: error: changes meaning of
‘PlacementMO’ from ‘typedef class mobject::Placement<mobject::MObject,
mobject::MObject> mobject::PlacementMO’
This seems to satisfy g++ 4.4.2, which otherwise complains like this:
In file included from ../src/proc/mobject/session/session-impl.hpp:53,
from ../src/proc/mobject/session/sess-manager-impl.hpp:28,
from ../src/proc/mobject/session/sess-manager-impl.cpp:41:
../src/proc/mobject/session/placement-index.hpp:163: error:
declaration of ‘typedef class mobject::Placement<mobject::MObject,
mobject::MObject> mobject::session::PlacementIndex::PlacementMO’
../src/proc/mobject/placement.hpp:244: error: changes meaning of
‘PlacementMO’ from ‘typedef class mobject::Placement<mobject::MObject,
mobject::MObject> mobject::PlacementMO’
* error::Runtime exception class which transports the C error code
* lumiera::throwOnError() which throws when there is a pending
lumiera error, otherwise it does nothing