Michal Sojka [Sat, 14 Mar 2015 15:39:35 +0000 (16:39 +0100)]
Use CLOCK_MONOTONIC rather than CLOCK_REALTIME
This changes the clock used internally by ORTE for timestamps in the
protocol and for timing of internal operations. Previously,
CLOCK_REALTIME was used, probably because it is the default clock used
by pthread_cond_timedwait(). Using CLOCK_REALTIME has the disadvantage
that the time can "jump", e.g. when the clock is adjusted by ntpdate.
This causes the applications to stop publishing, which results in them
disappearing from the domain even through their processes still run.
The solution implemented in this commit is to switch the clock to
CLOCK_MONOTONIC, which does not jump. This should have no effect at the
protocol level, because the semantic of timestamps is not defined in the
spec. This was also tested by running the implementations with and
without this change against each other.
In future, it might be a good idea to use different clocks for
timestamps in the protocol and for timing of internal operations (e.g.
ORTEAppSendThread()). I'm not sure what happens in the following two
cases:
1) When one node is suspended to RAM/disk, CLOCK_MONOTONIC stops for the
time of suspension and it is not clear to me what other nodes that
run continuously do when the suspended node resumes.
2) When a node is rebooted, the monotonic clock starts from zero, i.e.
there is a "jump". I'm not sure, whether IDs of the application
before and after reboot will be different. UDP ports, that are a part
of the ID should be randomized, but the question is how good this
randomization is. If the ID is the same before and after reboot some
problems might also appear.
jiri hubacek [Sat, 31 Jan 2015 19:51:17 +0000 (20:51 +0100)]
Simplified approach to write application.
- no need for fragments
- no need for complex approach to backward compatibility
- usable drawables choosen
- cs language added
- help added
- settings added
Michal Sojka [Sat, 7 Feb 2015 12:21:22 +0000 (13:21 +0100)]
Add configuration for uncrustify
The formatting of ORTE source code is messy. To unify the formatting at
least a bit, we will use the uncrustify tool. This commit adds
uncrustify configuration tuned for ORTE sources and a helper script that
call uncrustify on all relevant files.
Michal Sojka [Fri, 16 Jan 2015 12:10:13 +0000 (13:10 +0100)]
Remove useless condition
I did small investigation whether the second condition should compare
something else or not and it seems that no other comparison is necessary.
Therefore I believe that removing this rather than changing it to something
else is the correct thing to do.
Martin Vajnar [Tue, 8 Apr 2014 08:51:27 +0000 (10:51 +0200)]
JORTE: fix bug in subscriber callback
This fixes a rarely occurring bug in subscriber callback.
When a Java subscriber is being destroyed, during the process
a JORTECallbackContext_t structure, used for storing pointers to Java objects,
was free()'d. If this occurred when new issue had arrived and was being
processed by the receive thread, then the pointer to the, now non-existent,
callback structure would have been dereferenced, leading to a SEGFAULT.
To fix this we now create a pointer to pointer to the specific structure
and pass this pointer to ORTESubcriptionCreate() and use it from the recvCallBack().
Pavel Pisa [Sun, 13 Apr 2014 11:17:08 +0000 (13:17 +0200)]
RTEMS: actual RTEMS git sources do not provide CONFIGURE_NUMBER_OF_DRIVERS define.
There is only one version of table - actual runtime version.
The read-only table with initialization data is not present
and cannot be used for to compute number of entries of config
harcoded drivers set (CONFIGURE_NUMBER_OF_DRIVERS).
Michal Sojka [Sat, 15 Mar 2014 23:48:48 +0000 (00:48 +0100)]
Update versioning of shared libraries
Previously, we used -release to specify the SONAME, which would cause
binary incompatibility between releases even if the library is not
changed at all. Additionally, libtool interface numbers were derived
from relase number in an undocumented way. This is removed as well and
now we have to modify SONAME manually, when the interface changes.
OMK is broken and some things do not work when shared libraries are
created. This has to wait for later. If you need shared library, use
automake-based build.
Pavel Pisa [Thu, 14 Nov 2013 13:02:50 +0000 (14:02 +0100)]
Fix reported problem "compile error on cygwin"
The Windows service support in ORTE manager is enabled
now for Cygwin build as well. Build under MINGW has been
tested but some external volunteer is required for Cygwin
environment test.
Another option is to add config option which allows
to specify if Windows service support should or should not
be build.
Pavel Pisa [Fri, 4 Oct 2013 07:48:27 +0000 (09:48 +0200)]
Omit "byteswap.h" from pre-configured OMK Linux build.
The CDR and rest of the ORTE code uses open-codded ORTE provided
rtps_byteswap function. Build environment provided byteswap
functions are not utilized in the actual ORTE setups.
They could result in better optimized code in future but
attempt to include "byteswap.h" is probably the last blocker
to use Linux pre-configured ORTE on RTEMS, BSD and BlackBerry.
So comment out HAVE_BYTESWAP_H for now.
Pavel Pisa [Mon, 30 Sep 2013 10:02:00 +0000 (12:02 +0200)]
OMK build: move linker specification of pthread library to separate variable TARGET_LOADLIBES.
This allows to override libraries list suitable for the Linux
build by other target OS specific list of the libraries.
I.e. the explicit "pthread" library specification is blocker
for QNX/BlackBerry build because POSIX threads are included
in stadartd library. On the other hand BSD networking "socket"
library has to be specified explicitly. Another difference
is missing "byteswap.h" header file (undef HAVE_BYTESWAP_H).