Add limited support for QoS changes

This commit adds support for changing all mutable QoS except those that
affect reader/writer matching (i.e., deadline, latency budget and
partition).  This is simply because the recalculation of the matches
hasn't been implemented yet, it is not a fundamental limitation.

Implementing this basically forced fixing up a bunch of inconsistencies
in handling QoS in entity creation.  A silly multi-process ping-pong
test built on changing the value of user data has been added.

Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
Erik Boasson 2019-06-04 20:47:08 +02:00 committed by eboasson
parent 11a1b9d6f9
commit a4d8aba4f9
32 changed files with 1225 additions and 361 deletions

View file

@ -19,6 +19,7 @@
#include "dds/ddsrt/heap.h"
#include "dds/ddsrt/log.h"
#include "dds/ddsrt/string.h"
#include "dds/ddsrt/process.h"
typedef char * (*expand_fn)(const char *src0);
@ -34,8 +35,16 @@ static void expand_append (char **dst, size_t *sz, size_t *pos, char c)
static char *expand_env (const char *name, char op, const char *alt, expand_fn expand)
{
char pidstr[20];
char *env = NULL;
(void)ddsrt_getenv (name, &env);
if (name[0] == '$' && name[1] == 0) {
snprintf (pidstr, sizeof (pidstr), "%"PRIdPID, ddsrt_getpid ());
env = pidstr;
} else {
(void) ddsrt_getenv (name, &env);
}
switch (op)
{
case 0: