Commit graph

124 commits

Author SHA1 Message Date
Erik Boasson
9bfac607a4 move MT19937 random generator to ddsrt
Signed-off-by: Erik Boasson <eb@ilities.com>
2019-05-23 18:51:23 +02:00
Jeroen Koekkoek
c38d9761f3 Move md5 from ddsi to ddsrt
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2019-05-23 18:51:23 +02:00
Jeroen Koekkoek
4200f9a846 Fix format strings and signatures for fixed size integers
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2019-05-23 18:51:23 +02:00
Martin Bremmer
2c878c3c62 Cleanup log tests.
Signed-off-by: Martin Bremmer <martin.bremmer@adlinktech.com>
2019-05-23 18:51:23 +02:00
Jeroen Koekkoek
aa2715f4fe Add support for FreeRTOS and lwIP (#166)
Add support for FreeRTOS and lwIP

Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2019-05-23 14:27:56 +02:00
Erik Boasson
5ca66f5bda Allow closing config elems with </> if from envvar
The Cyclone DDS configuration is in principle an XML document, but it is
possible to write configuration fragments directly in the CYCLONEDDS_URI
environment variable.  In that case, it is quite annoying to have to
enter the full closing tags all the time, and so it now allows closing
elements with a simple </> when not reading them from a file.

While it would be trivial to also allow this when reading the
configuration from a file, it seems that promulgating invalid XML would
be bad form ... and besides, in that case editors can help keep
everything in order.

Signed-off-by: Erik Boasson <eb@ilities.com>
2019-05-05 20:46:50 +08:00
Erik Boasson
b8e4b2a49b don't modify input string in XML parser
The XML parser has two modes: it can parse a file or parse a
caller-owned string.  In the former case, it owns its buffer and shifts
the contents to make room for more data read in from the file.  This
shifting may not happen when parsing a string.

Signed-off-by: Erik Boasson <eb@ilities.com>
2019-05-05 20:46:50 +08:00
Erik Boasson
b686ba858c make internal header files more C++ friendly
Generally one doesn't need to include any internal header files in an
application, but the (unstable) interface for application-defined sample
representation and serialization does require including some.  It turns
out a keyword clash had to be resolved (typename => type_name) and that
a whole bunch of them were missing the #ifdef __cplusplus / extern "C"
bit.

It further turned out that one had to pull in nearly all of the type
definitions, including some typedefs that are illegal in C++, e.g.,

  typedef struct os_sockWaitset *os_sockWaitset;

C++ is right to forbid this, but Cyclone's header files were wrong to
force inclusion of so much irrelevant stuff.  This commit leaves these
typedefs in place, but eliminates a few header file inclusions to avoid
the problem.

Signed-off-by: Erik Boasson <eb@ilities.com>
2019-04-29 11:15:41 +02:00
Martin Bremmer
7a705eabf0 Removed expand_envvars.h
Signed-off-by: Martin Bremmer <martin.bremmer@adlinktech.com>
2019-04-25 13:29:11 +02:00
Martin Bremmer
e9f6ec6f48 Be sure to not trigger the SIGCHLD
Signed-off-by: Martin Bremmer <martin.bremmer@adlinktech.com>
2019-04-24 15:13:30 +02:00
Martin Bremmer
44ce20ebe0 Fixed proc compile warning.
Signed-off-by: Martin Bremmer <martin.bremmer@adlinktech.com>
2019-04-24 15:00:37 +02:00
Martin Bremmer
973ae87e17 Moved expand_envvars.
Signed-off-by: Martin Bremmer <martin.bremmer@adlinktech.com>
2019-04-24 15:00:37 +02:00
Martin Bremmer
17f9c361ea Multi Process Testing framework
Signed-off-by: Martin Bremmer <martin.bremmer@adlinktech.com>
2019-04-24 14:46:46 +02:00
Martin Bremmer
0269774a60 Rudimentary process management.
Signed-off-by: Martin Bremmer <martin.bremmer@adlinktech.com>
2019-04-24 14:46:46 +02:00
Erik Boasson
9c1a739559 suppress EHOSTUNREACH and EHOSTDOWN errors in log
Signed-off-by: Erik Boasson <eb@ilities.com>
2019-04-24 14:09:30 +02:00
Erik Boasson
6c171a890d move util library into ddsrt
As was the plan with the introduction of ddsrt; this includes renaming
the identifiers to match the capitalization style and removes old junk.

Signed-off-by: Erik Boasson <eb@ilities.com>
2019-04-24 14:09:30 +02:00
Erik Boasson
31b8baa03b block signals in ddsrt_thread_create
Signal handling in multi-threaded processes is bad enough at the best of
times, and as we don't really use any signals in the Cyclone code, it
makes more sense to create all threads with most signals blocked.  That
way an application that wants to handle signals using sigwait() need not
block all signals prior to creating a participant.

Note that instead of blocking all signals, we block all except SIGXCPU.
The reason is that the liveliness monitoring and stack trace dumping
code currently relies on that signal.

Signed-off-by: Erik Boasson <eb@ilities.com>
2019-04-24 14:09:30 +02:00
Erik Boasson
c92820677d enable printf format checking for dds_log
Also remove superfluous parameters in a TRACE statement and fix a format
specification in pong.c.

Signed-off-by: Erik Boasson <eb@ilities.com>
2019-04-21 16:05:06 +02:00
Erik Boasson
6e87841ea5 move MT19937 random generator to ddsrt
Signed-off-by: Erik Boasson <eb@ilities.com>
2019-04-21 16:05:06 +02:00
Jeroen Koekkoek
3bdd2a140d Move md5 from ddsi to ddsrt
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2019-04-11 10:04:06 +02:00
Jeroen Koekkoek
63a5c87baf Fix format strings and signatures for fixed size integers
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2019-04-11 10:04:06 +02:00
Martin Bremmer
20880016e3 Cleanup log tests.
Signed-off-by: Martin Bremmer <martin.bremmer@adlinktech.com>
2019-03-28 09:43:24 +01:00
Erik Boasson
fcb6b935ea support for building/running on OpenIndiana
Signed-off-by: Erik Boasson <eb@ilities.com>
2019-03-23 15:40:29 +01:00
Jeroen Koekkoek
cd6742ee12 Rearrange and fixup abstraction layer
- Replace os_result by dds_retcode_t and move DDS return code defines down.
  Eliminates the need to convert between different return code types.

- Move dds_time_t down and remove os_time.
  Eliminates the need to convert between different time representations and
  reduces code duplication.

- Remove use of Microsoft source-code annotation language (SAL).
  SAL annotations are Microsoft specific and not very well documented. This
  makes it very difficult for contributers to write.

- Rearrange the abstraction layer to be feature-based. The previous layout
  falsely assumed that the operating system dictates which implementation is
  best suited. For general purpose operating systems this is mostly true, but
  embedded targets require a slightly different approach and may not even offer
  all features. The new layout makes it possible to mix-and-match feature
  implementations and allows for features to not be implemented at all.

- Replace the os prefix by ddsrt to avoid name collisions.

- Remove various portions of unused and unwanted code.

- Export thread names on all supported platforms.

- Return native thread identifier on POSIX compatible platforms.

- Add timed wait for condition variables that takes an absolute time.

- Remove system abstraction for errno. The os_getErrno and os_setErrno were
  incorrect. Functions that might fail now simply return a DDS return code
  instead.

- Remove thread-specific memory abstraction. os_threadMemGet and accompanying
  functions were a mess and their use has been eliminated by other changes in
  this commit.

- Replace attribute (re)defines by ddsrt_ prefixed equivalents to avoid name
  collisions and problems with faulty __nonnull__ attributes.

Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2019-03-22 15:19:09 +01:00