Michal Sojka [Sun, 20 Feb 2011 09:42:58 +0000 (10:42 +0100)]
forb: Fix synchronization error in forbrun
forbrun starts servers synchronously, i.e. the next server is started
only after the previous one is fully initialized (see
forb_signal_server_ready()). This synchronization was broken because
forb_signal_server_ready() was incorrectly called in
forb_execute_object() called from forb_execution_thread() called from
forb_init(). This caused that the semaphore for the synchronization had
the value of one (instead of zero) when forb_init() finished.
Therefore, the first waiting for the semaphore returned immediately
without actually waiting for the server.
This is now fixed by introduction of default_executor which is declared
in struct forb. This executor is initialized "manually", without
forb_execute_object(), so that the forb_signal_server_ready() is not
called.
In future, we might want use the default executor for executing requests
to other objects, which do not require a separate thread.
Michal Sojka [Sun, 20 Feb 2011 08:31:58 +0000 (09:31 +0100)]
wvtest: WVFAIL(cond) returns cond
Previously WVFAIL returned !cond. In my optinion it was confusing
because the statements
if (cond) print_error();
and
if (WVFAIL(cond)) print_error();
behaved differently. Now, they are functionally equivalent. In the
implementation we use C extensions typeof() and "statement expression"
to avoid duplication of side-effects caused by cond evaluation.
Michal Sojka [Sat, 19 Feb 2011 22:57:48 +0000 (23:57 +0100)]
forb: Fix deadlock in executor
The first iteration of executor loop waited for the request without
actually checking that there is no request in the queue. Therefore,
when the client sent the request before the executor called
fosa_cond_wait() for the first time, the executor blocked indefinitely.
Michal Sojka [Sat, 19 Feb 2011 13:42:16 +0000 (14:42 +0100)]
forb: Do not compile inet_broadcast if it is not used
When inet is the default protocol, broadcasts are not used (because they
are not reliable). Previously, if inet was the default, we didn't bind the
socket to multicast address and thus we were not able to receive the
broadcasts. This situation was confusing and therefore it is better omit
the implementation of inet_broadcast entirely to make this clear that it
is not used.
Michal Sojka [Fri, 18 Feb 2011 23:42:20 +0000 (00:42 +0100)]
forbrun: Enable uLUt-based logging
It had no sense to disable it -- it works fine for FORB logging. If it
is needed to change log levels of server, this could be implemented in
forb_main() of the particular server.
Michal Sojka [Fri, 18 Feb 2011 23:19:46 +0000 (00:19 +0100)]
forbrun: Comment out not passing test
This test does not pass because the registered references are not
distributed to other servers. This will be hopefully implemented later
through some kind of name server.
Michal Sojka [Tue, 15 Feb 2011 16:12:15 +0000 (17:12 +0100)]
forb: First implementation of forbrun
Not tested! forbrun should executed FORB servers implemented as shared
libraries. Its aim is to allow execution of multiple independent servers
in a single process. This is done in preparation of porting FRSH/FORB to
RTEMS (and other single-address space executives).
Michal Sojka [Tue, 8 Feb 2011 17:01:37 +0000 (18:01 +0100)]
forb: Add test for various invocation methods
This tests the following:
1) remote invocation (currently broken)
2) local invocation from application to the executor
3) local invocation from an executor to another one
4) direct invocation from an executor to the same one
Michal Sojka [Tue, 8 Feb 2011 15:34:33 +0000 (16:34 +0100)]
wvtest: Show stringified expressions in WVPASSEQ/NE
Previously, WVPASSEQ(func(), 0) printed only "0 == 0 ok", whereas now,
it prints "func() == 0 == 0 ok". This is useful when the test fails so
that the real value is seen in the output e.g. "func() == 1 == 0 FAILED".
Michal Sojka [Mon, 31 Jan 2011 09:00:49 +0000 (10:00 +0100)]
Split FOSA opaque types to multiple files based on platform name
The aim of this is to have more readable code. As we are now focused mainly
on Linux platform, we do not want to mistakenly find declarations for
other platforms.
Michal Sojka [Fri, 28 Jan 2011 16:04:37 +0000 (17:04 +0100)]
Initialize thread specific data in forb_init()
This was done to avoid race conditions which causes errors in code.
Unfortunately this change does not help since FOSA is broken and we will
better use plain POSIX here.
Pavel Pisa [Fri, 21 Jan 2011 23:41:28 +0000 (00:41 +0100)]
uLUt library header files can be moved to include/ulut subdirectory.
If the option
CONFIG_OC_ULUT_INCDIR=y
is selected, the copy of uLUt library header files
is added into "ulut" subdirectory of include location
but copy in commonly used top level location is
provided as well.
If the
CONFIG_OC_ULUT_INCDIRONLY=y
option is enabled the the uLUt header files are placed
only in "ulut" subdirectory location.