Rename q_globals to ddsi_domaingv
The name (not its definition) now leaks out in ddsi_sertopic, and the messy old names really shouldn't pollute the interface any more than necessary. Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
parent
d92d491b83
commit
551dae69a4
82 changed files with 402 additions and 408 deletions
|
@ -19,11 +19,11 @@ extern "C" {
|
|||
struct dds_rhc;
|
||||
struct dds_reader;
|
||||
struct ddsi_sertopic;
|
||||
struct q_globals;
|
||||
struct ddsi_domaingv;
|
||||
struct dds_rhc_default;
|
||||
struct rhc_sample;
|
||||
|
||||
DDS_EXPORT struct dds_rhc *dds_rhc_default_new_xchecks (dds_reader *reader, struct q_globals *gv, const struct ddsi_sertopic *topic, bool xchecks);
|
||||
DDS_EXPORT struct dds_rhc *dds_rhc_default_new_xchecks (dds_reader *reader, struct ddsi_domaingv *gv, const struct ddsi_sertopic *topic, bool xchecks);
|
||||
DDS_EXPORT struct dds_rhc *dds_rhc_default_new (struct dds_reader *reader, const struct ddsi_sertopic *topic);
|
||||
#ifdef DDSI_INCLUDE_LIFESPAN
|
||||
DDS_EXPORT nn_mtime_t dds_rhc_default_sample_expired_cb(void *hc, nn_mtime_t tnow);
|
||||
|
|
|
@ -33,7 +33,7 @@ enum ddsi_sertopic_builtintopic_type {
|
|||
DSBT_WRITER
|
||||
};
|
||||
|
||||
struct q_globals;
|
||||
struct ddsi_domaingv;
|
||||
struct ddsi_sertopic_builtintopic {
|
||||
struct ddsi_sertopic c;
|
||||
enum ddsi_sertopic_builtintopic_type type;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "dds/dds.h"
|
||||
#include "dds/ddsrt/sync.h"
|
||||
#include "dds/ddsi/q_rtps.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsrt/avl.h"
|
||||
#include "dds/ddsi/ddsi_builtin_topic_if.h"
|
||||
#include "dds__handles.h"
|
||||
|
@ -227,7 +227,7 @@ typedef struct dds_domain {
|
|||
struct local_orphan_writer *builtintopic_writer_subscriptions;
|
||||
|
||||
struct ddsi_builtin_topic_interface btif;
|
||||
struct q_globals gv;
|
||||
struct ddsi_domaingv gv;
|
||||
} dds_domain;
|
||||
|
||||
typedef struct dds_subscriber {
|
||||
|
|
|
@ -18,11 +18,11 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct q_globals;
|
||||
struct ddsi_domaingv;
|
||||
struct whc_writer_info;
|
||||
struct dds_writer;
|
||||
|
||||
struct whc *whc_new (struct q_globals *gv, const struct whc_writer_info *wrinfo);
|
||||
struct whc *whc_new (struct ddsi_domaingv *gv, const struct whc_writer_info *wrinfo);
|
||||
struct whc_writer_info *whc_make_wrinfo (struct dds_writer *wr, const dds_qos_t *qos);
|
||||
void whc_free_wrinfo (struct whc_writer_info *);
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "dds/ddsi/q_entity.h"
|
||||
#include "dds/ddsi/q_thread.h"
|
||||
#include "dds/ddsi/q_config.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsi/q_plist.h" /* for nn_keyhash */
|
||||
#include "dds__init.h"
|
||||
#include "dds__domain.h"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "dds/ddsi/q_entity.h"
|
||||
#include "dds/ddsi/q_config.h"
|
||||
#include "dds/ddsi/q_gc.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
|
||||
static dds_return_t dds_domain_free (dds_entity *vdomain);
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "dds/ddsi/q_entity.h"
|
||||
#include "dds/ddsi/q_config.h"
|
||||
#include "dds/ddsi/q_gc.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/version.h"
|
||||
|
||||
static void dds_close (struct dds_entity *e);
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "dds/ddsi/ddsi_serdata.h"
|
||||
#include "dds/ddsi/q_entity.h"
|
||||
#include "dds/ddsi/q_thread.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
|
||||
dds_return_t dds_writedispose (dds_entity_t writer, const void *data)
|
||||
{
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "dds/dds.h"
|
||||
#include "dds/version.h"
|
||||
#include "dds/ddsi/q_config.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsi/q_entity.h"
|
||||
#include "dds/ddsi/ddsi_entity_index.h"
|
||||
#include "dds/ddsi/q_thread.h"
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include "dds/ddsi/q_thread.h"
|
||||
#include "dds/ddsi/q_config.h"
|
||||
#include "dds/ddsi/q_plist.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsi/ddsi_entity_index.h"
|
||||
#include "dds/version.h"
|
||||
#include "dds__init.h"
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "dds__qos.h"
|
||||
#include "dds/ddsi/ddsi_iid.h"
|
||||
#include "dds/ddsi/q_entity.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/version.h"
|
||||
|
||||
DECL_ENTITY_LOCK_UNLOCK (extern inline, dds_publisher)
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include "dds/ddsi/q_thread.h"
|
||||
#include "dds/ddsi/ddsi_entity_index.h"
|
||||
#include "dds/ddsi/q_entity.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsi/ddsi_sertopic.h"
|
||||
|
||||
/*
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "dds__qos.h"
|
||||
#include "dds/ddsi/q_entity.h"
|
||||
#include "dds/ddsi/q_thread.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds__builtin.h"
|
||||
#include "dds/ddsi/ddsi_sertopic.h"
|
||||
#include "dds/ddsi/ddsi_entity_index.h"
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include "dds/ddsi/q_xqos.h"
|
||||
#include "dds/ddsi/q_unused.h"
|
||||
#include "dds/ddsi/q_config.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsi/q_radmin.h" /* sampleinfo */
|
||||
#include "dds/ddsi/q_entity.h" /* proxy_writer_info */
|
||||
#include "dds/ddsi/ddsi_serdata.h"
|
||||
|
@ -273,13 +273,13 @@ struct rhc_instance {
|
|||
uint32_t disposed_gen; /* bloody generation counters - worst invention of mankind */
|
||||
uint32_t no_writers_gen; /* __/ */
|
||||
int32_t strength; /* "current" ownership strength */
|
||||
ddsi_guid_t wr_guid; /* guid of last writer (if wr_iid != 0 then wr_guid is the corresponding guid, else undef) */
|
||||
ddsi_guid_t wr_guid; /* guid of last writer (if wr_iid != 0 then wr_guid is the corresponding guid, else undef) */
|
||||
nn_wctime_t tstamp; /* source time stamp of last update */
|
||||
struct ddsrt_circlist_elem nonempty_list; /* links non-empty instances in arbitrary ordering */
|
||||
#ifdef DDSI_INCLUDE_DEADLINE_MISSED
|
||||
struct deadline_elem deadline; /* element in deadline missed administration */
|
||||
#endif
|
||||
struct ddsi_tkmap_instance *tk; /* backref into TK for unref'ing */
|
||||
struct ddsi_tkmap_instance *tk;/* backref into TK for unref'ing */
|
||||
struct rhc_sample a_sample; /* pre-allocated storage for 1 sample */
|
||||
};
|
||||
|
||||
|
@ -318,7 +318,7 @@ struct dds_rhc_default {
|
|||
|
||||
dds_reader *reader; /* reader -- may be NULL (used by rhc_torture) */
|
||||
struct ddsi_tkmap *tkmap; /* back pointer to tkmap */
|
||||
struct q_globals *gv; /* globals -- so far only for log config */
|
||||
struct ddsi_domaingv *gv; /* globals -- so far only for log config */
|
||||
const struct ddsi_sertopic *topic; /* topic description */
|
||||
uint32_t history_depth; /* depth, 1 for KEEP_LAST_1, 2**32-1 for KEEP_ALL */
|
||||
|
||||
|
@ -637,7 +637,7 @@ nn_mtime_t dds_rhc_default_deadline_missed_cb(void *hc, nn_mtime_t tnow)
|
|||
}
|
||||
#endif /* DDSI_INCLUDE_DEADLINE_MISSED */
|
||||
|
||||
struct dds_rhc *dds_rhc_default_new_xchecks (dds_reader *reader, struct q_globals *gv, const struct ddsi_sertopic *topic, bool xchecks)
|
||||
struct dds_rhc *dds_rhc_default_new_xchecks (dds_reader *reader, struct ddsi_domaingv *gv, const struct ddsi_sertopic *topic, bool xchecks)
|
||||
{
|
||||
struct dds_rhc_default *rhc = ddsrt_malloc (sizeof (*rhc));
|
||||
memset (rhc, 0, sizeof (*rhc));
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "dds__qos.h"
|
||||
#include "dds/ddsi/ddsi_iid.h"
|
||||
#include "dds/ddsi/q_entity.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsrt/heap.h"
|
||||
#include "dds/version.h"
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "dds/ddsi/q_ddsi_discovery.h"
|
||||
#include "dds/ddsi/ddsi_iid.h"
|
||||
#include "dds/ddsi/q_plist.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds__serdata_builtintopic.h"
|
||||
|
||||
DECL_ENTITY_LOCK_UNLOCK (extern inline, dds_topic)
|
||||
|
@ -222,7 +222,7 @@ const struct dds_entity_deriver dds_entity_deriver_topic = {
|
|||
*/
|
||||
static dds_return_t lookup_and_check_ktopic (struct dds_ktopic **ktp_out, dds_participant *pp, const char *name, const char *type_name, const dds_qos_t *new_qos)
|
||||
{
|
||||
struct q_globals * const gv = &pp->m_entity.m_domain->gv;
|
||||
struct ddsi_domaingv * const gv = &pp->m_entity.m_domain->gv;
|
||||
struct dds_ktopic *ktp;
|
||||
if ((ktp = *ktp_out = ddsrt_avl_lookup (&participant_ktopics_treedef, &pp->m_ktopics, name)) == NULL)
|
||||
{
|
||||
|
@ -315,7 +315,7 @@ dds_entity_t dds_create_topic_arbitrary (dds_entity_t participant, struct ddsi_s
|
|||
* Leaving the topic QoS sparse means a default-default topic QoS of
|
||||
* best-effort will do "the right thing" and let a writer still default to
|
||||
* reliable ... (and keep behaviour unchanged) */
|
||||
struct q_globals * const gv = &pp->m_entity.m_domain->gv;
|
||||
struct ddsi_domaingv * const gv = &pp->m_entity.m_domain->gv;
|
||||
if ((rc = nn_xqos_valid (&gv->logconfig, new_qos)) != DDS_RETCODE_OK)
|
||||
{
|
||||
dds_delete_qos (new_qos);
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "dds/ddsi/q_time.h"
|
||||
#include "dds/ddsi/q_rtps.h"
|
||||
#include "dds/ddsi/q_freelist.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsi/q_entity.h"
|
||||
#include "dds__whc.h"
|
||||
#include "dds__entity.h"
|
||||
|
@ -103,7 +103,7 @@ struct whc_impl {
|
|||
uint32_t fragment_size;
|
||||
uint64_t total_bytes; /* total number of bytes pushed in */
|
||||
unsigned xchecks: 1;
|
||||
struct q_globals *gv;
|
||||
struct ddsi_domaingv *gv;
|
||||
struct ddsi_tkmap *tkmap;
|
||||
struct whc_writer_info wrinfo;
|
||||
seqno_t max_drop_seq; /* samples in whc with seq <= max_drop_seq => transient-local */
|
||||
|
@ -439,7 +439,7 @@ void whc_free_wrinfo (struct whc_writer_info *wrinfo)
|
|||
ddsrt_free (wrinfo);
|
||||
}
|
||||
|
||||
struct whc *whc_new (struct q_globals *gv, const struct whc_writer_info *wrinfo)
|
||||
struct whc *whc_new (struct ddsi_domaingv *gv, const struct whc_writer_info *wrinfo)
|
||||
{
|
||||
size_t sample_overhead = 80; /* INFO_TS, DATA (estimate), inline QoS */
|
||||
struct whc_impl *whc;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "dds/ddsi/q_config.h"
|
||||
#include "dds/ddsi/ddsi_entity_index.h"
|
||||
#include "dds/ddsi/q_entity.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsi/ddsi_tkmap.h"
|
||||
#include "dds__serdata_builtintopic.h"
|
||||
#include "dds__whc_builtintopic.h"
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "dds/ddsi/q_config.h"
|
||||
#include "dds/ddsi/q_entity.h"
|
||||
#include "dds/ddsi/q_radmin.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsi/ddsi_deliver_locally.h"
|
||||
|
||||
dds_return_t dds_write (dds_entity_t writer, const void *data)
|
||||
|
@ -93,7 +93,7 @@ struct local_sourceinfo {
|
|||
nn_mtime_t timeout;
|
||||
};
|
||||
|
||||
static struct ddsi_serdata *local_make_sample (struct ddsi_tkmap_instance **tk, struct q_globals *gv, struct ddsi_sertopic const * const topic, void *vsourceinfo)
|
||||
static struct ddsi_serdata *local_make_sample (struct ddsi_tkmap_instance **tk, struct ddsi_domaingv *gv, struct ddsi_sertopic const * const topic, void *vsourceinfo)
|
||||
{
|
||||
struct local_sourceinfo *si = vsourceinfo;
|
||||
if (topic == si->src_topic)
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "dds/version.h"
|
||||
#include "dds/ddsrt/static_assert.h"
|
||||
#include "dds/ddsi/q_config.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsi/q_entity.h"
|
||||
#include "dds/ddsi/q_thread.h"
|
||||
#include "dds/ddsi/q_xmsg.h"
|
||||
|
@ -181,7 +181,7 @@ static void dds_writer_interrupt (dds_entity *e) ddsrt_nonnull_all;
|
|||
|
||||
static void dds_writer_interrupt (dds_entity *e)
|
||||
{
|
||||
struct q_globals * const gv = &e->m_domain->gv;
|
||||
struct ddsi_domaingv * const gv = &e->m_domain->gv;
|
||||
thread_state_awake (lookup_thread_state (), gv);
|
||||
unblock_throttled_writer (gv, &e->m_guid);
|
||||
thread_state_asleep (lookup_thread_state ());
|
||||
|
@ -192,7 +192,7 @@ static void dds_writer_close (dds_entity *e) ddsrt_nonnull_all;
|
|||
static void dds_writer_close (dds_entity *e)
|
||||
{
|
||||
struct dds_writer * const wr = (struct dds_writer *) e;
|
||||
struct q_globals * const gv = &e->m_domain->gv;
|
||||
struct ddsi_domaingv * const gv = &e->m_domain->gv;
|
||||
struct thread_state1 * const ts1 = lookup_thread_state ();
|
||||
thread_state_awake (ts1, gv);
|
||||
nn_xpack_send (wr->m_xp, false);
|
||||
|
|
|
@ -94,6 +94,7 @@ PREPEND(hdrs_private_ddsi "${CMAKE_CURRENT_LIST_DIR}/include/dds/ddsi"
|
|||
ddsi_entity_index.h
|
||||
ddsi_deadline.h
|
||||
ddsi_deliver_locally.h
|
||||
ddsi_domaingv.h
|
||||
q_addrset.h
|
||||
q_bitset.h
|
||||
q_bswap.h
|
||||
|
@ -104,7 +105,6 @@ PREPEND(hdrs_private_ddsi "${CMAKE_CURRENT_LIST_DIR}/include/dds/ddsi"
|
|||
q_feature_check.h
|
||||
q_freelist.h
|
||||
q_gc.h
|
||||
q_globals.h
|
||||
q_hbcontrol.h
|
||||
q_lat_estim.h
|
||||
q_lease.h
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
#include "dds/ddsrt/circlist.h"
|
||||
#include "dds/ddsi/q_time.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsi/q_xevent.h"
|
||||
|
||||
#if defined (__cplusplus)
|
||||
|
@ -37,7 +37,7 @@ struct deadline_elem {
|
|||
nn_mtime_t t_deadline;
|
||||
};
|
||||
|
||||
DDS_EXPORT void deadline_init (const struct q_globals *gv, struct deadline_adm *deadline_adm, size_t list_offset, size_t elem_offset, deadline_missed_cb_t deadline_missed_cb);
|
||||
DDS_EXPORT void deadline_init (const struct ddsi_domaingv *gv, struct deadline_adm *deadline_adm, size_t list_offset, size_t elem_offset, deadline_missed_cb_t deadline_missed_cb);
|
||||
DDS_EXPORT void deadline_stop (const struct deadline_adm *deadline_adm);
|
||||
DDS_EXPORT void deadline_clear (struct deadline_adm *deadline_adm);
|
||||
DDS_EXPORT void deadline_fini (const struct deadline_adm *deadline_adm);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct q_globals;
|
||||
struct ddsi_domaingv;
|
||||
struct ddsi_tkmap_instance;
|
||||
struct ddsi_sertopic;
|
||||
struct ddsi_serdata;
|
||||
|
@ -34,7 +34,7 @@ struct entity_common;
|
|||
struct ddsi_writer_info;
|
||||
struct local_reader_ary;
|
||||
|
||||
typedef struct ddsi_serdata * (*deliver_locally_makesample_t) (struct ddsi_tkmap_instance **tk, struct q_globals *gv, struct ddsi_sertopic const * const topic, void *vsourceinfo);
|
||||
typedef struct ddsi_serdata * (*deliver_locally_makesample_t) (struct ddsi_tkmap_instance **tk, struct ddsi_domaingv *gv, struct ddsi_sertopic const * const topic, void *vsourceinfo);
|
||||
typedef struct reader * (*deliver_locally_first_reader_t) (struct entity_index *entity_index, struct entity_common *source_entity, ddsrt_avl_iter_t *it);
|
||||
typedef struct reader * (*deliver_locally_next_reader_t) (struct entity_index *entity_index, ddsrt_avl_iter_t *it);
|
||||
|
||||
|
@ -51,9 +51,9 @@ struct deliver_locally_ops {
|
|||
deliver_locally_on_failure_fastpath_t on_failure_fastpath;
|
||||
};
|
||||
|
||||
dds_return_t deliver_locally_one (struct q_globals *gv, struct entity_common *source_entity, bool source_entity_locked, const ddsi_guid_t *rdguid, const struct ddsi_writer_info *wrinfo, const struct deliver_locally_ops * __restrict ops, void *vsourceinfo);
|
||||
dds_return_t deliver_locally_one (struct ddsi_domaingv *gv, struct entity_common *source_entity, bool source_entity_locked, const ddsi_guid_t *rdguid, const struct ddsi_writer_info *wrinfo, const struct deliver_locally_ops * __restrict ops, void *vsourceinfo);
|
||||
|
||||
dds_return_t deliver_locally_allinsync (struct q_globals *gv, struct entity_common *source_entity, bool source_entity_locked, struct local_reader_ary *fastpath_rdary, const struct ddsi_writer_info *wrinfo, const struct deliver_locally_ops * __restrict ops, void *vsourceinfo);
|
||||
dds_return_t deliver_locally_allinsync (struct ddsi_domaingv *gv, struct entity_common *source_entity, bool source_entity_locked, struct local_reader_ary *fastpath_rdary, const struct ddsi_writer_info *wrinfo, const struct deliver_locally_ops * __restrict ops, void *vsourceinfo);
|
||||
|
||||
#if defined (__cplusplus)
|
||||
}
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
*
|
||||
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
|
||||
*/
|
||||
#ifndef Q_GLOBALS_H
|
||||
#define Q_GLOBALS_H
|
||||
#ifndef DDSI_DOMAINGV_H
|
||||
#define DDSI_DOMAINGV_H
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -68,7 +68,7 @@ enum recv_thread_mode {
|
|||
struct recv_thread_arg {
|
||||
enum recv_thread_mode mode;
|
||||
struct nn_rbufpool *rbpool;
|
||||
struct q_globals *gv;
|
||||
struct ddsi_domaingv *gv;
|
||||
union {
|
||||
struct {
|
||||
const nn_locator_t *loc;
|
||||
|
@ -82,7 +82,7 @@ struct recv_thread_arg {
|
|||
|
||||
struct deleted_participants_admin;
|
||||
|
||||
struct q_globals {
|
||||
struct ddsi_domaingv {
|
||||
volatile int terminate;
|
||||
volatile int deaf;
|
||||
volatile int mute;
|
||||
|
@ -270,11 +270,6 @@ struct q_globals {
|
|||
struct ddsi_sertopic *plist_topic; /* used for all discovery data */
|
||||
struct ddsi_sertopic *rawcdr_topic; /* used for participant message data */
|
||||
|
||||
/* Network ID needed by v_groupWrite -- FIXME: might as well pass it
|
||||
to the receive thread instead of making it global (and that would
|
||||
remove the need to include kernelModule.h) */
|
||||
uint32_t myNetworkId;
|
||||
|
||||
ddsrt_mutex_t sendq_lock;
|
||||
ddsrt_cond_t sendq_cond;
|
||||
unsigned sendq_length;
|
||||
|
@ -299,4 +294,4 @@ struct q_globals {
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif /* Q_GLOBALS_H */
|
||||
#endif /* DDSI_DOMAINGV_H */
|
|
@ -21,7 +21,7 @@ extern "C" {
|
|||
|
||||
struct entity_index;
|
||||
struct ddsi_guid;
|
||||
struct q_globals;
|
||||
struct ddsi_domaingv;
|
||||
|
||||
struct match_entities_range_key {
|
||||
union {
|
||||
|
@ -63,7 +63,7 @@ struct entidx_enum
|
|||
at the protocol level slightly before the network reader can use it
|
||||
to transmit data. */
|
||||
|
||||
struct entity_index *entity_index_new (struct q_globals *gv) ddsrt_nonnull_all;
|
||||
struct entity_index *entity_index_new (struct ddsi_domaingv *gv) ddsrt_nonnull_all;
|
||||
void entity_index_free (struct entity_index *ei) ddsrt_nonnull_all;
|
||||
|
||||
void entidx_insert_participant_guid (struct entity_index *ei, struct participant *pp) ddsrt_nonnull_all;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
#include "dds/ddsrt/fibheap.h"
|
||||
#include "dds/ddsi/q_time.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
|
||||
#if defined (__cplusplus)
|
||||
extern "C" {
|
||||
|
@ -35,7 +35,7 @@ struct lifespan_fhnode {
|
|||
nn_mtime_t t_expire;
|
||||
};
|
||||
|
||||
DDS_EXPORT void lifespan_init (const struct q_globals *gv, struct lifespan_adm *lifespan_adm, size_t fh_offset, size_t fh_node_offset, sample_expired_cb_t sample_expired_cb);
|
||||
DDS_EXPORT void lifespan_init (const struct ddsi_domaingv *gv, struct lifespan_adm *lifespan_adm, size_t fh_offset, size_t fh_node_offset, sample_expired_cb_t sample_expired_cb);
|
||||
DDS_EXPORT void lifespan_fini (const struct lifespan_adm *lifespan_adm);
|
||||
DDS_EXPORT nn_mtime_t lifespan_next_expired_locked (const struct lifespan_adm *lifespan_adm, nn_mtime_t tnow, void **sample);
|
||||
DDS_EXPORT void lifespan_register_sample_real (struct lifespan_adm *lifespan_adm, struct lifespan_fhnode *node);
|
||||
|
|
|
@ -22,10 +22,10 @@ struct nn_group_membership;
|
|||
|
||||
struct nn_group_membership *new_group_membership (void);
|
||||
void free_group_membership (struct nn_group_membership *mship);
|
||||
int ddsi_join_mc (const struct q_globals *gv, struct nn_group_membership *mship, ddsi_tran_conn_t conn, const nn_locator_t *srcip, const nn_locator_t *mcip);
|
||||
int ddsi_leave_mc (const struct q_globals *gv, struct nn_group_membership *mship, ddsi_tran_conn_t conn, const nn_locator_t *srcip, const nn_locator_t *mcip);
|
||||
int ddsi_join_mc (const struct ddsi_domaingv *gv, struct nn_group_membership *mship, ddsi_tran_conn_t conn, const nn_locator_t *srcip, const nn_locator_t *mcip);
|
||||
int ddsi_leave_mc (const struct ddsi_domaingv *gv, struct nn_group_membership *mship, ddsi_tran_conn_t conn, const nn_locator_t *srcip, const nn_locator_t *mcip);
|
||||
void ddsi_transfer_group_membership (struct nn_group_membership *mship, ddsi_tran_conn_t conn, ddsi_tran_conn_t newconn);
|
||||
int ddsi_rejoin_transferred_mcgroups (const struct q_globals *gv, struct nn_group_membership *mship, ddsi_tran_conn_t conn);
|
||||
int ddsi_rejoin_transferred_mcgroups (const struct ddsi_domaingv *gv, struct nn_group_membership *mship, ddsi_tran_conn_t conn);
|
||||
|
||||
#if defined (__cplusplus)
|
||||
}
|
||||
|
|
|
@ -18,14 +18,14 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct q_globals;
|
||||
struct ddsi_domaingv;
|
||||
struct thread_state1;
|
||||
struct ddsi_guid;
|
||||
struct nn_xpack;
|
||||
struct participant;
|
||||
struct receiver_state;
|
||||
|
||||
void write_pmd_message_guid (struct q_globals * const gv, struct ddsi_guid *pp_guid, unsigned pmd_kind);
|
||||
void write_pmd_message_guid (struct ddsi_domaingv * const gv, struct ddsi_guid *pp_guid, unsigned pmd_kind);
|
||||
void write_pmd_message (struct thread_state1 * const ts1, struct nn_xpack *xp, struct participant *pp, unsigned pmd_kind);
|
||||
void handle_pmd_message (const struct receiver_state *rst, nn_wctime_t timestamp, uint32_t statusinfo, const void *vdata, uint32_t len);
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
int ddsi_raweth_init (struct q_globals *gv);
|
||||
int ddsi_raweth_init (struct ddsi_domaingv *gv);
|
||||
|
||||
#if defined (__cplusplus)
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ extern "C" {
|
|||
struct ddsi_serdata;
|
||||
struct ddsi_serdata_ops;
|
||||
struct ddsi_sertopic_ops;
|
||||
struct q_globals;
|
||||
struct ddsi_domaingv;
|
||||
|
||||
struct ddsi_sertopic {
|
||||
const struct ddsi_sertopic_ops *ops;
|
||||
|
@ -33,7 +33,7 @@ struct ddsi_sertopic {
|
|||
char *name;
|
||||
char *type_name;
|
||||
uint64_t iid;
|
||||
struct q_globals *gv;
|
||||
struct ddsi_domaingv *gv;
|
||||
ddsrt_atomic_uint32_t refc; /* counts refs from entities (topic, reader, writer), not from data */
|
||||
};
|
||||
|
||||
|
@ -92,8 +92,8 @@ struct ddsi_sertopic_ops {
|
|||
ddsi_sertopic_hash_t hash;
|
||||
};
|
||||
|
||||
struct ddsi_sertopic *ddsi_sertopic_lookup_locked (struct q_globals *gv, const struct ddsi_sertopic *sertopic_template);
|
||||
void ddsi_sertopic_register_locked (struct q_globals *gv, struct ddsi_sertopic *sertopic);
|
||||
struct ddsi_sertopic *ddsi_sertopic_lookup_locked (struct ddsi_domaingv *gv, const struct ddsi_sertopic *sertopic_template);
|
||||
void ddsi_sertopic_register_locked (struct ddsi_domaingv *gv, struct ddsi_sertopic *sertopic);
|
||||
|
||||
DDS_EXPORT void ddsi_sertopic_init (struct ddsi_sertopic *tp, const char *name, const char *type_name, const struct ddsi_sertopic_ops *sertopic_ops, const struct ddsi_serdata_ops *serdata_ops, bool topickind_no_key);
|
||||
DDS_EXPORT void ddsi_sertopic_fini (struct ddsi_sertopic *tp);
|
||||
|
|
|
@ -24,15 +24,15 @@ extern "C" {
|
|||
|
||||
struct ddsi_ssl_plugins
|
||||
{
|
||||
bool (*init) (struct q_globals *gv);
|
||||
bool (*init) (struct ddsi_domaingv *gv);
|
||||
void (*fini) (void);
|
||||
void (*ssl_free) (SSL *ssl);
|
||||
void (*bio_vfree) (BIO *bio);
|
||||
ssize_t (*read) (SSL *ssl, void *buf, size_t len, dds_return_t *err);
|
||||
ssize_t (*write) (SSL *ssl, const void *msg, size_t len, dds_return_t *err);
|
||||
SSL * (*connect) (const struct q_globals *gv, ddsrt_socket_t sock);
|
||||
SSL * (*connect) (const struct ddsi_domaingv *gv, ddsrt_socket_t sock);
|
||||
BIO * (*listen) (ddsrt_socket_t sock);
|
||||
SSL * (*accept) (const struct q_globals *gv, BIO *bio, ddsrt_socket_t *sock);
|
||||
SSL * (*accept) (const struct ddsi_domaingv *gv, BIO *bio, ddsrt_socket_t *sock);
|
||||
};
|
||||
|
||||
#if defined (__cplusplus)
|
||||
|
@ -45,7 +45,7 @@ struct ddsi_ssl_plugins
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
int ddsi_tcp_init (struct q_globals *gv);
|
||||
int ddsi_tcp_init (struct ddsi_domaingv *gv);
|
||||
|
||||
#if defined (__cplusplus)
|
||||
}
|
||||
|
|
|
@ -17,12 +17,12 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
struct ddsi_threadmon;
|
||||
struct q_globals;
|
||||
struct ddsi_domaingv;
|
||||
|
||||
struct ddsi_threadmon *ddsi_threadmon_new (int64_t liveliness_monitoring_interval, bool noprogress_log_stacktraces);
|
||||
dds_return_t ddsi_threadmon_start (struct ddsi_threadmon *sl, const char *name);
|
||||
void ddsi_threadmon_register_domain (struct ddsi_threadmon *sl, const struct q_globals *gv);
|
||||
void ddsi_threadmon_unregister_domain (struct ddsi_threadmon *sl, const struct q_globals *gv);
|
||||
void ddsi_threadmon_register_domain (struct ddsi_threadmon *sl, const struct ddsi_domaingv *gv);
|
||||
void ddsi_threadmon_unregister_domain (struct ddsi_threadmon *sl, const struct ddsi_domaingv *gv);
|
||||
void ddsi_threadmon_stop (struct ddsi_threadmon *sl);
|
||||
void ddsi_threadmon_free (struct ddsi_threadmon *sl);
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ extern "C" {
|
|||
struct ddsi_tkmap;
|
||||
struct ddsi_serdata;
|
||||
struct dds_topic;
|
||||
struct q_globals;
|
||||
struct ddsi_domaingv;
|
||||
|
||||
struct ddsi_tkmap_instance
|
||||
{
|
||||
|
@ -31,7 +31,7 @@ struct ddsi_tkmap_instance
|
|||
ddsrt_atomic_uint32_t m_refc;
|
||||
};
|
||||
|
||||
DDS_EXPORT struct ddsi_tkmap *ddsi_tkmap_new (struct q_globals *gv);
|
||||
DDS_EXPORT struct ddsi_tkmap *ddsi_tkmap_new (struct ddsi_domaingv *gv);
|
||||
DDS_EXPORT void ddsi_tkmap_free (struct ddsi_tkmap *tkmap);
|
||||
DDS_EXPORT void ddsi_tkmap_instance_ref (struct ddsi_tkmap_instance *tk);
|
||||
DDS_EXPORT uint64_t ddsi_tkmap_lookup (struct ddsi_tkmap *tkmap, const struct ddsi_serdata *serdata);
|
||||
|
|
|
@ -94,7 +94,7 @@ typedef char * (*ddsi_locator_to_string_fn_t) (char *dst, size_t sizeof_dst, con
|
|||
typedef int (*ddsi_enumerate_interfaces_fn_t) (ddsi_tran_factory_t tran, enum transport_selector transport_selector, ddsrt_ifaddrs_t **interfs);
|
||||
|
||||
/* Data types */
|
||||
struct q_globals;
|
||||
struct ddsi_domaingv;
|
||||
struct ddsi_tran_base
|
||||
{
|
||||
/* Data */
|
||||
|
@ -102,7 +102,7 @@ struct ddsi_tran_base
|
|||
uint32_t m_port;
|
||||
uint32_t m_trantype;
|
||||
bool m_multicast;
|
||||
struct q_globals *gv;
|
||||
struct ddsi_domaingv *gv;
|
||||
|
||||
/* Functions */
|
||||
|
||||
|
@ -182,7 +182,7 @@ struct ddsi_tran_factory
|
|||
const char *m_default_spdp_address;
|
||||
bool m_connless;
|
||||
bool m_stream;
|
||||
struct q_globals *gv;
|
||||
struct ddsi_domaingv *gv;
|
||||
|
||||
/* Relationships */
|
||||
|
||||
|
@ -197,11 +197,11 @@ struct ddsi_tran_qos
|
|||
int m_diffserv;
|
||||
};
|
||||
|
||||
void ddsi_tran_factories_fini (struct q_globals *gv);
|
||||
void ddsi_factory_add (struct q_globals *gv, ddsi_tran_factory_t factory);
|
||||
void ddsi_tran_factories_fini (struct ddsi_domaingv *gv);
|
||||
void ddsi_factory_add (struct ddsi_domaingv *gv, ddsi_tran_factory_t factory);
|
||||
void ddsi_factory_free (ddsi_tran_factory_t factory);
|
||||
ddsi_tran_factory_t ddsi_factory_find (const struct q_globals *gv, const char * type);
|
||||
ddsi_tran_factory_t ddsi_factory_find_supported_kind (const struct q_globals *gv, int32_t kind);
|
||||
ddsi_tran_factory_t ddsi_factory_find (const struct ddsi_domaingv *gv, const char * type);
|
||||
ddsi_tran_factory_t ddsi_factory_find_supported_kind (const struct ddsi_domaingv *gv, int32_t kind);
|
||||
void ddsi_factory_conn_init (const struct ddsi_tran_factory *factory, ddsi_tran_conn_t conn);
|
||||
|
||||
inline bool ddsi_factory_supports (const struct ddsi_tran_factory *factory, int32_t kind) {
|
||||
|
@ -253,11 +253,11 @@ int ddsi_conn_join_mc (ddsi_tran_conn_t conn, const nn_locator_t *srcip, const n
|
|||
int ddsi_conn_leave_mc (ddsi_tran_conn_t conn, const nn_locator_t *srcip, const nn_locator_t *mcip, const struct nn_interface *interf);
|
||||
void ddsi_conn_transfer_group_membership (ddsi_tran_conn_t conn, ddsi_tran_conn_t newconn);
|
||||
int ddsi_conn_rejoin_transferred_mcgroups (ddsi_tran_conn_t conn);
|
||||
int ddsi_is_mcaddr (const struct q_globals *gv, const nn_locator_t *loc);
|
||||
int ddsi_is_ssm_mcaddr (const struct q_globals *gv, const nn_locator_t *loc);
|
||||
int ddsi_is_mcaddr (const struct ddsi_domaingv *gv, const nn_locator_t *loc);
|
||||
int ddsi_is_ssm_mcaddr (const struct ddsi_domaingv *gv, const nn_locator_t *loc);
|
||||
enum ddsi_nearby_address_result ddsi_is_nearby_address (const nn_locator_t *loc, const nn_locator_t *ownloc, size_t ninterf, const struct nn_interface *interf);
|
||||
|
||||
enum ddsi_locator_from_string_result ddsi_locator_from_string (const struct q_globals *gv, nn_locator_t *loc, const char *str, ddsi_tran_factory_t default_factory);
|
||||
enum ddsi_locator_from_string_result ddsi_locator_from_string (const struct ddsi_domaingv *gv, nn_locator_t *loc, const char *str, ddsi_tran_factory_t default_factory);
|
||||
|
||||
/* 8 for transport/
|
||||
1 for [
|
||||
|
|
|
@ -24,7 +24,7 @@ typedef struct nn_udpv4mcgen_address {
|
|||
uint8_t idx; /* must be last: then sorting will put them consecutively */
|
||||
} nn_udpv4mcgen_address_t;
|
||||
|
||||
int ddsi_udp_init (struct q_globals *gv);
|
||||
int ddsi_udp_init (struct ddsi_domaingv *gv);
|
||||
|
||||
#if defined (__cplusplus)
|
||||
}
|
||||
|
|
|
@ -39,16 +39,16 @@ typedef ssize_t (*addrset_forone_fun_t) (const nn_locator_t *loc, void *arg);
|
|||
struct addrset *new_addrset (void);
|
||||
struct addrset *ref_addrset (struct addrset *as);
|
||||
void unref_addrset (struct addrset *as);
|
||||
void add_to_addrset (const struct q_globals *gv, struct addrset *as, const nn_locator_t *loc);
|
||||
void remove_from_addrset (const struct q_globals *gv, struct addrset *as, const nn_locator_t *loc);
|
||||
void add_to_addrset (const struct ddsi_domaingv *gv, struct addrset *as, const nn_locator_t *loc);
|
||||
void remove_from_addrset (const struct ddsi_domaingv *gv, struct addrset *as, const nn_locator_t *loc);
|
||||
int addrset_purge (struct addrset *as);
|
||||
int compare_locators (const nn_locator_t *a, const nn_locator_t *b);
|
||||
|
||||
/* These lock ASADD, then lock/unlock AS any number of times, then
|
||||
unlock ASADD */
|
||||
void copy_addrset_into_addrset_uc (const struct q_globals *gv, struct addrset *as, const struct addrset *asadd);
|
||||
void copy_addrset_into_addrset_mc (const struct q_globals *gv, struct addrset *as, const struct addrset *asadd);
|
||||
void copy_addrset_into_addrset (const struct q_globals *gv, struct addrset *as, const struct addrset *asadd);
|
||||
void copy_addrset_into_addrset_uc (const struct ddsi_domaingv *gv, struct addrset *as, const struct addrset *asadd);
|
||||
void copy_addrset_into_addrset_mc (const struct ddsi_domaingv *gv, struct addrset *as, const struct addrset *asadd);
|
||||
void copy_addrset_into_addrset (const struct ddsi_domaingv *gv, struct addrset *as, const struct addrset *asadd);
|
||||
|
||||
size_t addrset_count (const struct addrset *as);
|
||||
size_t addrset_count_uc (const struct addrset *as);
|
||||
|
@ -63,7 +63,7 @@ int addrset_any_mc (const struct addrset *as, nn_locator_t *dst);
|
|||
int addrset_forone (struct addrset *as, addrset_forone_fun_t f, void *arg);
|
||||
void addrset_forall (struct addrset *as, addrset_forall_fun_t f, void *arg);
|
||||
size_t addrset_forall_count (struct addrset *as, addrset_forall_fun_t f, void *arg);
|
||||
void nn_log_addrset (struct q_globals *gv, uint32_t tf, const char *prefix, const struct addrset *as);
|
||||
void nn_log_addrset (struct ddsi_domaingv *gv, uint32_t tf, const char *prefix, const struct addrset *as);
|
||||
|
||||
/* Tries to lock A then B for a decent check, returning false if
|
||||
trylock B fails */
|
||||
|
@ -72,15 +72,15 @@ int addrset_eq_onesidederr (const struct addrset *a, const struct addrset *b);
|
|||
int is_unspec_locator (const nn_locator_t *loc);
|
||||
void set_unspec_locator (nn_locator_t *loc);
|
||||
|
||||
struct q_globals;
|
||||
int add_addresses_to_addrset (const struct q_globals *gv, struct addrset *as, const char *addrs, int port_mode, const char *msgtag, int req_mc);
|
||||
struct ddsi_domaingv;
|
||||
int add_addresses_to_addrset (const struct ddsi_domaingv *gv, struct addrset *as, const char *addrs, int port_mode, const char *msgtag, int req_mc);
|
||||
|
||||
#ifdef DDSI_INCLUDE_SSM
|
||||
int addrset_contains_ssm (const struct q_globals *gv, const struct addrset *as);
|
||||
int addrset_any_ssm (const struct q_globals *gv, const struct addrset *as, nn_locator_t *dst);
|
||||
int addrset_any_non_ssm_mc (const struct q_globals *gv, const struct addrset *as, nn_locator_t *dst);
|
||||
void copy_addrset_into_addrset_no_ssm_mc (const struct q_globals *gv, struct addrset *as, const struct addrset *asadd);
|
||||
void copy_addrset_into_addrset_no_ssm (const struct q_globals *gv, struct addrset *as, const struct addrset *asadd);
|
||||
int addrset_contains_ssm (const struct ddsi_domaingv *gv, const struct addrset *as);
|
||||
int addrset_any_ssm (const struct ddsi_domaingv *gv, const struct addrset *as, nn_locator_t *dst);
|
||||
int addrset_any_non_ssm_mc (const struct ddsi_domaingv *gv, const struct addrset *as, nn_locator_t *dst);
|
||||
void copy_addrset_into_addrset_no_ssm_mc (const struct ddsi_domaingv *gv, struct addrset *as, const struct addrset *asadd);
|
||||
void copy_addrset_into_addrset_no_ssm (const struct ddsi_domaingv *gv, struct addrset *as, const struct addrset *asadd);
|
||||
#endif
|
||||
|
||||
#if defined (__cplusplus)
|
||||
|
|
|
@ -20,7 +20,7 @@ struct debug_monitor;
|
|||
typedef int (*debug_monitor_cpf_t) (ddsi_tran_conn_t conn, const char *fmt, ...);
|
||||
typedef int (*debug_monitor_plugin_t) (ddsi_tran_conn_t conn, debug_monitor_cpf_t cpf, void *arg);
|
||||
|
||||
struct debug_monitor *new_debug_monitor (struct q_globals *gv, int32_t port);
|
||||
struct debug_monitor *new_debug_monitor (struct ddsi_domaingv *gv, int32_t port);
|
||||
void add_debug_monitor_plugin (struct debug_monitor *dm, debug_monitor_plugin_t fn, void *arg);
|
||||
void free_debug_monitor (struct debug_monitor *dm);
|
||||
|
||||
|
|
|
@ -165,7 +165,7 @@ struct entity_common {
|
|||
struct ddsi_tkmap_instance *tk;
|
||||
ddsrt_mutex_t lock;
|
||||
bool onlylocal;
|
||||
struct q_globals *gv;
|
||||
struct ddsi_domaingv *gv;
|
||||
ddsrt_avl_node_t all_entities_avlnode;
|
||||
|
||||
/* QoS changes always lock the entity itself, and additionally
|
||||
|
@ -530,7 +530,7 @@ nn_vendorid_t get_entity_vendorid (const struct entity_common *e);
|
|||
* @retval DDS_RETCODE_OUT_OF_RESOURCES
|
||||
* The configured maximum number of participants has been reached.
|
||||
*/
|
||||
dds_return_t new_participant_guid (const ddsi_guid_t *ppguid, struct q_globals *gv, unsigned flags, const struct nn_plist *plist);
|
||||
dds_return_t new_participant_guid (const ddsi_guid_t *ppguid, struct ddsi_domaingv *gv, unsigned flags, const struct nn_plist *plist);
|
||||
|
||||
/**
|
||||
* @brief Create a new participant in the domain. See also new_participant_guid.
|
||||
|
@ -554,7 +554,7 @@ dds_return_t new_participant_guid (const ddsi_guid_t *ppguid, struct q_globals *
|
|||
* @retval DDS_RETCODE_OUT_OF_RESOURCES
|
||||
* The configured maximum number of participants has been reached.
|
||||
*/
|
||||
dds_return_t new_participant (struct ddsi_guid *ppguid, struct q_globals *gv, unsigned flags, const struct nn_plist *plist);
|
||||
dds_return_t new_participant (struct ddsi_guid *ppguid, struct ddsi_domaingv *gv, unsigned flags, const struct nn_plist *plist);
|
||||
|
||||
/**
|
||||
* @brief Initiate the deletion of the participant:
|
||||
|
@ -580,9 +580,9 @@ dds_return_t new_participant (struct ddsi_guid *ppguid, struct q_globals *gv, un
|
|||
* @retval DDS_RETCODE_BAD_PARAMETER
|
||||
* ppguid lookup failed.
|
||||
*/
|
||||
dds_return_t delete_participant (struct q_globals *gv, const struct ddsi_guid *ppguid);
|
||||
dds_return_t delete_participant (struct ddsi_domaingv *gv, const struct ddsi_guid *ppguid);
|
||||
void update_participant_plist (struct participant *pp, const struct nn_plist *plist);
|
||||
uint64_t get_entity_instance_id (const struct q_globals *gv, const struct ddsi_guid *guid);
|
||||
uint64_t get_entity_instance_id (const struct ddsi_domaingv *gv, const struct ddsi_guid *guid);
|
||||
|
||||
/* Gets the interval for PMD messages, which is the minimal lease duration for writers
|
||||
with auto liveliness in this participant, or the participants lease duration if shorter */
|
||||
|
@ -597,9 +597,9 @@ DDS_EXPORT struct writer *get_builtin_writer (const struct participant *pp, unsi
|
|||
GUID "ppguid". May return NULL if participant unknown or
|
||||
writer/reader already known. */
|
||||
|
||||
dds_return_t new_writer (struct writer **wr_out, struct q_globals *gv, struct ddsi_guid *wrguid, const struct ddsi_guid *group_guid, const struct ddsi_guid *ppguid, const struct ddsi_sertopic *topic, const struct dds_qos *xqos, struct whc * whc, status_cb_t status_cb, void *status_cb_arg);
|
||||
dds_return_t new_writer (struct writer **wr_out, struct ddsi_domaingv *gv, struct ddsi_guid *wrguid, const struct ddsi_guid *group_guid, const struct ddsi_guid *ppguid, const struct ddsi_sertopic *topic, const struct dds_qos *xqos, struct whc * whc, status_cb_t status_cb, void *status_cb_arg);
|
||||
|
||||
dds_return_t new_reader (struct reader **rd_out, struct q_globals *gv, struct ddsi_guid *rdguid, const struct ddsi_guid *group_guid, const struct ddsi_guid *ppguid, const struct ddsi_sertopic *topic, const struct dds_qos *xqos, struct ddsi_rhc * rhc, status_cb_t status_cb, void *status_cb_arg);
|
||||
dds_return_t new_reader (struct reader **rd_out, struct ddsi_domaingv *gv, struct ddsi_guid *rdguid, const struct ddsi_guid *group_guid, const struct ddsi_guid *ppguid, const struct ddsi_sertopic *topic, const struct dds_qos *xqos, struct ddsi_rhc * rhc, status_cb_t status_cb, void *status_cb_arg);
|
||||
|
||||
void update_reader_qos (struct reader *rd, const struct dds_qos *xqos);
|
||||
void update_writer_qos (struct writer *wr, const struct dds_qos *xqos);
|
||||
|
@ -613,17 +613,17 @@ void writer_set_retransmitting (struct writer *wr);
|
|||
void writer_clear_retransmitting (struct writer *wr);
|
||||
dds_return_t writer_wait_for_acks (struct writer *wr, dds_time_t abstimeout);
|
||||
|
||||
dds_return_t unblock_throttled_writer (struct q_globals *gv, const struct ddsi_guid *guid);
|
||||
dds_return_t delete_writer (struct q_globals *gv, const struct ddsi_guid *guid);
|
||||
dds_return_t delete_writer_nolinger (struct q_globals *gv, const struct ddsi_guid *guid);
|
||||
dds_return_t unblock_throttled_writer (struct ddsi_domaingv *gv, const struct ddsi_guid *guid);
|
||||
dds_return_t delete_writer (struct ddsi_domaingv *gv, const struct ddsi_guid *guid);
|
||||
dds_return_t delete_writer_nolinger (struct ddsi_domaingv *gv, const struct ddsi_guid *guid);
|
||||
dds_return_t delete_writer_nolinger_locked (struct writer *wr);
|
||||
|
||||
dds_return_t delete_reader (struct q_globals *gv, const struct ddsi_guid *guid);
|
||||
dds_return_t delete_reader (struct ddsi_domaingv *gv, const struct ddsi_guid *guid);
|
||||
|
||||
struct local_orphan_writer {
|
||||
struct writer wr;
|
||||
};
|
||||
struct local_orphan_writer *new_local_orphan_writer (struct q_globals *gv, ddsi_entityid_t entityid, struct ddsi_sertopic *topic, const struct dds_qos *xqos, struct whc *whc);
|
||||
struct local_orphan_writer *new_local_orphan_writer (struct ddsi_domaingv *gv, ddsi_entityid_t entityid, struct ddsi_sertopic *topic, const struct dds_qos *xqos, struct whc *whc);
|
||||
void delete_local_orphan_writer (struct local_orphan_writer *wr);
|
||||
|
||||
void writer_set_alive_may_unlock (struct writer *wr, bool notify);
|
||||
|
@ -653,20 +653,20 @@ int writer_set_notalive (struct writer *wr, bool notify);
|
|||
/* Set when this proxy participant is not to be announced on the built-in topics yet */
|
||||
#define CF_PROXYPP_NO_SPDP (1 << 3)
|
||||
|
||||
void new_proxy_participant (struct q_globals *gv, const struct ddsi_guid *guid, uint32_t bes, const struct ddsi_guid *privileged_pp_guid, struct addrset *as_default, struct addrset *as_meta, const struct nn_plist *plist, dds_duration_t tlease_dur, nn_vendorid_t vendor, unsigned custom_flags, nn_wctime_t timestamp, seqno_t seq);
|
||||
int delete_proxy_participant_by_guid (struct q_globals *gv, const struct ddsi_guid *guid, nn_wctime_t timestamp, int isimplicit);
|
||||
void new_proxy_participant (struct ddsi_domaingv *gv, const struct ddsi_guid *guid, uint32_t bes, const struct ddsi_guid *privileged_pp_guid, struct addrset *as_default, struct addrset *as_meta, const struct nn_plist *plist, dds_duration_t tlease_dur, nn_vendorid_t vendor, unsigned custom_flags, nn_wctime_t timestamp, seqno_t seq);
|
||||
int delete_proxy_participant_by_guid (struct ddsi_domaingv *gv, const struct ddsi_guid *guid, nn_wctime_t timestamp, int isimplicit);
|
||||
|
||||
int update_proxy_participant_plist_locked (struct proxy_participant *proxypp, seqno_t seq, const struct nn_plist *datap, nn_wctime_t timestamp);
|
||||
int update_proxy_participant_plist (struct proxy_participant *proxypp, seqno_t seq, const struct nn_plist *datap, nn_wctime_t timestamp);
|
||||
void proxy_participant_reassign_lease (struct proxy_participant *proxypp, struct lease *newlease);
|
||||
|
||||
void purge_proxy_participants (struct q_globals *gv, const nn_locator_t *loc, bool delete_from_as_disc);
|
||||
void purge_proxy_participants (struct ddsi_domaingv *gv, const nn_locator_t *loc, bool delete_from_as_disc);
|
||||
|
||||
|
||||
/* To create a new proxy writer or reader; the proxy participant is
|
||||
determined from the GUID and must exist. */
|
||||
int new_proxy_writer (struct q_globals *gv, const struct ddsi_guid *ppguid, const struct ddsi_guid *guid, struct addrset *as, const struct nn_plist *plist, struct nn_dqueue *dqueue, struct xeventq *evq, nn_wctime_t timestamp, seqno_t seq);
|
||||
int new_proxy_reader (struct q_globals *gv, const struct ddsi_guid *ppguid, const struct ddsi_guid *guid, struct addrset *as, const struct nn_plist *plist, nn_wctime_t timestamp, seqno_t seq
|
||||
int new_proxy_writer (struct ddsi_domaingv *gv, const struct ddsi_guid *ppguid, const struct ddsi_guid *guid, struct addrset *as, const struct nn_plist *plist, struct nn_dqueue *dqueue, struct xeventq *evq, nn_wctime_t timestamp, seqno_t seq);
|
||||
int new_proxy_reader (struct ddsi_domaingv *gv, const struct ddsi_guid *ppguid, const struct ddsi_guid *guid, struct addrset *as, const struct nn_plist *plist, nn_wctime_t timestamp, seqno_t seq
|
||||
#ifdef DDSI_INCLUDE_SSM
|
||||
, int favours_ssm
|
||||
#endif
|
||||
|
@ -677,8 +677,8 @@ int new_proxy_reader (struct q_globals *gv, const struct ddsi_guid *ppguid, cons
|
|||
reader or writer. Actual deletion is scheduled in the future, when
|
||||
no outstanding references may still exist (determined by checking
|
||||
thread progress, &c.). */
|
||||
int delete_proxy_writer (struct q_globals *gv, const struct ddsi_guid *guid, nn_wctime_t timestamp, int isimplicit);
|
||||
int delete_proxy_reader (struct q_globals *gv, const struct ddsi_guid *guid, nn_wctime_t timestamp, int isimplicit);
|
||||
int delete_proxy_writer (struct ddsi_domaingv *gv, const struct ddsi_guid *guid, nn_wctime_t timestamp, int isimplicit);
|
||||
int delete_proxy_reader (struct ddsi_domaingv *gv, const struct ddsi_guid *guid, nn_wctime_t timestamp, int isimplicit);
|
||||
|
||||
void update_proxy_reader (struct proxy_reader *prd, seqno_t seq, struct addrset *as, const struct dds_qos *xqos, nn_wctime_t timestamp);
|
||||
void update_proxy_writer (struct proxy_writer *pwr, seqno_t seq, struct addrset *as, const struct dds_qos *xqos, nn_wctime_t timestamp);
|
||||
|
@ -693,7 +693,7 @@ void delete_proxy_group (struct entity_index *entidx, const struct ddsi_guid *gu
|
|||
|
||||
/* Call this to empty all address sets of all writers to stop all outgoing traffic, or to
|
||||
rebuild them all (which only makes sense after previously having emptied them all). */
|
||||
void rebuild_or_clear_writer_addrsets(struct q_globals *gv, int rebuild);
|
||||
void rebuild_or_clear_writer_addrsets(struct ddsi_domaingv *gv, int rebuild);
|
||||
|
||||
void local_reader_ary_setfastpath_ok (struct local_reader_ary *x, bool fastpath_ok);
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ extern "C" {
|
|||
|
||||
struct gcreq;
|
||||
struct gcreq_queue;
|
||||
struct q_globals;
|
||||
struct ddsi_domaingv;
|
||||
|
||||
struct writer;
|
||||
struct reader;
|
||||
|
@ -44,7 +44,7 @@ struct gcreq {
|
|||
struct idx_vtime vtimes[];
|
||||
};
|
||||
|
||||
DDS_EXPORT struct gcreq_queue *gcreq_queue_new (struct q_globals *gv);
|
||||
DDS_EXPORT struct gcreq_queue *gcreq_queue_new (struct ddsi_domaingv *gv);
|
||||
DDS_EXPORT void gcreq_queue_drain (struct gcreq_queue *q);
|
||||
DDS_EXPORT void gcreq_queue_free (struct gcreq_queue *q);
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
int create_multicast_sockets (struct q_globals *gv);
|
||||
int joinleave_spdp_defmcip (struct q_globals *gv, int dojoin);
|
||||
int create_multicast_sockets (struct ddsi_domaingv *gv);
|
||||
int joinleave_spdp_defmcip (struct ddsi_domaingv *gv, int dojoin);
|
||||
|
||||
#if defined (__cplusplus)
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ extern "C" {
|
|||
struct receiver_state;
|
||||
struct participant;
|
||||
struct entity_common;
|
||||
struct q_globals; /* FIXME: make a special for the lease admin */
|
||||
struct ddsi_domaingv; /* FIXME: make a special for the lease admin */
|
||||
|
||||
struct lease {
|
||||
ddsrt_fibheap_node_t heapnode;
|
||||
|
@ -37,8 +37,8 @@ struct lease {
|
|||
|
||||
int compare_lease_tsched (const void *va, const void *vb);
|
||||
int compare_lease_tdur (const void *va, const void *vb);
|
||||
void lease_management_init (struct q_globals *gv);
|
||||
void lease_management_term (struct q_globals *gv);
|
||||
void lease_management_init (struct ddsi_domaingv *gv);
|
||||
void lease_management_term (struct ddsi_domaingv *gv);
|
||||
struct lease *lease_new (nn_etime_t texpire, int64_t tdur, struct entity_common *e);
|
||||
struct lease *lease_clone (const struct lease *l);
|
||||
void lease_register (struct lease *l);
|
||||
|
@ -46,7 +46,7 @@ void lease_unregister (struct lease *l);
|
|||
void lease_free (struct lease *l);
|
||||
void lease_renew (struct lease *l, nn_etime_t tnow);
|
||||
void lease_set_expiry (struct lease *l, nn_etime_t when);
|
||||
int64_t check_and_handle_lease_expiration (struct q_globals *gv, nn_etime_t tnow);
|
||||
int64_t check_and_handle_lease_expiration (struct ddsi_domaingv *gv, nn_etime_t tnow);
|
||||
|
||||
#if defined (__cplusplus)
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct q_globals;
|
||||
struct ddsi_domaingv;
|
||||
|
||||
#define MAX_INTERFACES 128
|
||||
struct nn_interface {
|
||||
|
@ -35,8 +35,8 @@ struct nn_interface {
|
|||
char *name;
|
||||
};
|
||||
|
||||
int make_socket (ddsrt_socket_t *socket, uint16_t port, bool stream, bool reuse, const struct q_globals *gv);
|
||||
int find_own_ip (struct q_globals *gv, const char *requested_address);
|
||||
int make_socket (ddsrt_socket_t *socket, uint16_t port, bool stream, bool reuse, const struct ddsi_domaingv *gv);
|
||||
int find_own_ip (struct ddsi_domaingv *gv, const char *requested_address);
|
||||
uint32_t locator_to_hopefully_unique_uint32 (const nn_locator_t *src);
|
||||
|
||||
#if defined (__cplusplus)
|
||||
|
|
|
@ -23,8 +23,8 @@ struct msghdr;
|
|||
|
||||
FILE * new_pcap_file (const struct ddsrt_log_cfg *logcfg, const char *name);
|
||||
|
||||
void write_pcap_received (struct q_globals *gv, nn_wctime_t tstamp, const struct sockaddr_storage *src, const struct sockaddr_storage *dst, unsigned char *buf, size_t sz);
|
||||
void write_pcap_sent (struct q_globals *gv, nn_wctime_t tstamp, const struct sockaddr_storage *src,
|
||||
void write_pcap_received (struct ddsi_domaingv *gv, nn_wctime_t tstamp, const struct sockaddr_storage *src, const struct sockaddr_storage *dst, unsigned char *buf, size_t sz);
|
||||
void write_pcap_sent (struct ddsi_domaingv *gv, nn_wctime_t tstamp, const struct sockaddr_storage *src,
|
||||
const ddsrt_msghdr_t *hdr, size_t sz);
|
||||
|
||||
#if defined (__cplusplus)
|
||||
|
|
|
@ -111,7 +111,7 @@ struct receiver_state {
|
|||
nn_protocol_version_t protocol_version; /* 2 => 44/48 */
|
||||
ddsi_tran_conn_t conn; /* Connection for request */
|
||||
nn_locator_t srcloc;
|
||||
struct q_globals *gv;
|
||||
struct ddsi_domaingv *gv;
|
||||
};
|
||||
|
||||
struct nn_rsample_info {
|
||||
|
@ -230,7 +230,7 @@ int nn_reorder_wantsample (struct nn_reorder *reorder, seqno_t seq);
|
|||
unsigned nn_reorder_nackmap (struct nn_reorder *reorder, seqno_t base, seqno_t maxseq, struct nn_sequence_number_set_header *map, uint32_t *mapbits, uint32_t maxsz, int notail);
|
||||
seqno_t nn_reorder_next_seq (const struct nn_reorder *reorder);
|
||||
|
||||
struct nn_dqueue *nn_dqueue_new (const char *name, const struct q_globals *gv, uint32_t max_samples, nn_dqueue_handler_t handler, void *arg);
|
||||
struct nn_dqueue *nn_dqueue_new (const char *name, const struct ddsi_domaingv *gv, uint32_t max_samples, nn_dqueue_handler_t handler, void *arg);
|
||||
void nn_dqueue_free (struct nn_dqueue *q);
|
||||
bool nn_dqueue_enqueue_deferred_wakeup (struct nn_dqueue *q, struct nn_rsample_chain *sc, nn_reorder_result_t rres);
|
||||
void dd_dqueue_enqueue_trigger (struct nn_dqueue *q);
|
||||
|
|
|
@ -22,7 +22,7 @@ struct nn_rdata;
|
|||
struct ddsi_tran_listener;
|
||||
struct recv_thread_arg;
|
||||
|
||||
void trigger_recv_threads (const struct q_globals *gv);
|
||||
void trigger_recv_threads (const struct ddsi_domaingv *gv);
|
||||
uint32_t recv_thread (void *vrecv_thread_arg);
|
||||
uint32_t listen_thread (struct ddsi_tran_listener * listener);
|
||||
int user_dqueue_handler (const struct nn_rsample_info *sampleinfo, const struct nn_rdata *fragchain, const ddsi_guid_t *rdguid, void *qarg);
|
||||
|
|
|
@ -58,13 +58,13 @@ typedef int64_t seqno_t;
|
|||
#define NN_ENTITYID_ALLOCSTEP 0x100
|
||||
|
||||
struct cfgst;
|
||||
struct q_globals;
|
||||
int rtps_config_prep (struct q_globals *config, struct cfgst *cfgst);
|
||||
int rtps_config_open_trace (struct q_globals *config);
|
||||
int rtps_init (struct q_globals *config);
|
||||
int rtps_start (struct q_globals *config);
|
||||
void rtps_stop (struct q_globals *config);
|
||||
void rtps_fini (struct q_globals *config);
|
||||
struct ddsi_domaingv;
|
||||
int rtps_config_prep (struct ddsi_domaingv *config, struct cfgst *cfgst);
|
||||
int rtps_config_open_trace (struct ddsi_domaingv *config);
|
||||
int rtps_init (struct ddsi_domaingv *config);
|
||||
int rtps_start (struct ddsi_domaingv *config);
|
||||
void rtps_stop (struct ddsi_domaingv *config);
|
||||
void rtps_fini (struct ddsi_domaingv *config);
|
||||
|
||||
#if defined (__cplusplus)
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ enum thread_state {
|
|||
THREAD_STATE_ALIVE /* known to be alive - for Cyclone internal threads */
|
||||
};
|
||||
|
||||
struct q_globals;
|
||||
struct ddsi_domaingv;
|
||||
struct config;
|
||||
struct ddsrt_log_cfg;
|
||||
|
||||
|
@ -103,10 +103,10 @@ DDS_EXPORT bool thread_states_fini (void);
|
|||
|
||||
DDS_EXPORT const struct config_thread_properties_listelem *lookup_thread_properties (const struct config *config, const char *name);
|
||||
DDS_EXPORT dds_return_t create_thread_with_properties (struct thread_state1 **ts1, struct config_thread_properties_listelem const * const tprops, const char *name, uint32_t (*f) (void *arg), void *arg);
|
||||
DDS_EXPORT dds_return_t create_thread (struct thread_state1 **ts, const struct q_globals *gv, const char *name, uint32_t (*f) (void *arg), void *arg);
|
||||
DDS_EXPORT dds_return_t create_thread (struct thread_state1 **ts, const struct ddsi_domaingv *gv, const char *name, uint32_t (*f) (void *arg), void *arg);
|
||||
DDS_EXPORT struct thread_state1 *lookup_thread_state_real (void);
|
||||
DDS_EXPORT dds_return_t join_thread (struct thread_state1 *ts1);
|
||||
DDS_EXPORT void log_stack_traces (const struct ddsrt_log_cfg *logcfg, const struct q_globals *gv);
|
||||
DDS_EXPORT void log_stack_traces (const struct ddsrt_log_cfg *logcfg, const struct ddsi_domaingv *gv);
|
||||
DDS_EXPORT void reset_thread_state (struct thread_state1 *ts1);
|
||||
DDS_EXPORT int thread_exists (const char *name);
|
||||
|
||||
|
@ -161,13 +161,13 @@ DDS_EXPORT inline void thread_state_asleep (struct thread_state1 *ts1)
|
|||
ddsrt_atomic_st32 (&ts1->vtime, vt);
|
||||
}
|
||||
|
||||
DDS_EXPORT inline void thread_state_awake (struct thread_state1 *ts1, const struct q_globals *gv)
|
||||
DDS_EXPORT inline void thread_state_awake (struct thread_state1 *ts1, const struct ddsi_domaingv *gv)
|
||||
{
|
||||
vtime_t vt = ddsrt_atomic_ld32 (&ts1->vtime);
|
||||
assert ((vt & VTIME_NEST_MASK) < VTIME_NEST_MASK);
|
||||
assert (gv != NULL);
|
||||
assert (ts1->state != THREAD_STATE_ALIVE || gv == ddsrt_atomic_ldvoidp (&ts1->gv));
|
||||
ddsrt_atomic_stvoidp (&ts1->gv, (struct q_globals *) gv);
|
||||
ddsrt_atomic_stvoidp (&ts1->gv, (struct ddsi_domaingv *) gv);
|
||||
ddsrt_atomic_fence_stst ();
|
||||
ddsrt_atomic_st32 (&ts1->vtime, vt + 1u);
|
||||
/* nested calls a rare and an extra fence doesn't break things */
|
||||
|
|
|
@ -43,7 +43,7 @@ int write_sample_nogc_notk (struct thread_state1 * const ts1, struct nn_xpack *x
|
|||
dds_return_t create_fragment_message (struct writer *wr, seqno_t seq, const struct nn_plist *plist, struct ddsi_serdata *serdata, unsigned fragnum, struct proxy_reader *prd,struct nn_xmsg **msg, int isnew);
|
||||
int enqueue_sample_wrlock_held (struct writer *wr, seqno_t seq, const struct nn_plist *plist, struct ddsi_serdata *serdata, struct proxy_reader *prd, int isnew);
|
||||
void add_Heartbeat (struct nn_xmsg *msg, struct writer *wr, const struct whc_state *whcst, int hbansreq, int hbliveliness, ddsi_entityid_t dst, int issync);
|
||||
dds_return_t write_hb_liveliness (struct q_globals * const gv, struct ddsi_guid *wr_guid, struct nn_xpack *xp);
|
||||
dds_return_t write_hb_liveliness (struct ddsi_domaingv * const gv, struct ddsi_guid *wr_guid, struct nn_xpack *xp);
|
||||
|
||||
#if defined (__cplusplus)
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@ void nn_xmsg_set_data_readerId (struct nn_xmsg *m, ddsi_entityid_t *readerId);
|
|||
Returns 1 if merge was successful, else 0. On failure, neither
|
||||
message will have been changed and both should be sent as if there
|
||||
had been no merging. */
|
||||
int nn_xmsg_merge_rexmit_destinations_wrlock_held (struct q_globals *gv, struct nn_xmsg *m, const struct nn_xmsg *madd);
|
||||
int nn_xmsg_merge_rexmit_destinations_wrlock_held (struct ddsi_domaingv *gv, struct nn_xmsg *m, const struct nn_xmsg *madd);
|
||||
|
||||
/* To set writer ids for updating last transmitted sequence number;
|
||||
wrfragid is 0 based, unlike DDSI but like other places where
|
||||
|
@ -135,10 +135,10 @@ int64_t nn_xpack_maxdelay (const struct nn_xpack *xp);
|
|||
unsigned nn_xpack_packetid (const struct nn_xpack *xp);
|
||||
|
||||
/* SENDQ */
|
||||
void nn_xpack_sendq_init (struct q_globals *gv);
|
||||
void nn_xpack_sendq_start (struct q_globals *gv);
|
||||
void nn_xpack_sendq_stop (struct q_globals *gv);
|
||||
void nn_xpack_sendq_fini (struct q_globals *gv);
|
||||
void nn_xpack_sendq_init (struct ddsi_domaingv *gv);
|
||||
void nn_xpack_sendq_start (struct ddsi_domaingv *gv);
|
||||
void nn_xpack_sendq_stop (struct ddsi_domaingv *gv);
|
||||
void nn_xpack_sendq_fini (struct ddsi_domaingv *gv);
|
||||
|
||||
#if defined (__cplusplus)
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ nn_mtime_t deadline_next_missed_locked (struct deadline_adm *deadline_adm, nn_mt
|
|||
return (elem != NULL) ? elem->t_deadline : NN_MTIME_NEVER;
|
||||
}
|
||||
|
||||
void deadline_init (const struct q_globals *gv, struct deadline_adm *deadline_adm, size_t list_offset, size_t elem_offset, deadline_missed_cb_t deadline_missed_cb)
|
||||
void deadline_init (const struct ddsi_domaingv *gv, struct deadline_adm *deadline_adm, size_t list_offset, size_t elem_offset, deadline_missed_cb_t deadline_missed_cb)
|
||||
{
|
||||
ddsrt_circlist_init (&deadline_adm->list);
|
||||
deadline_adm->evt = qxev_callback (gv->xevents, NN_MTIME_NEVER, instance_deadline_missed_cb, deadline_adm);
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "dds/ddsi/ddsi_tkmap.h"
|
||||
#include "dds/ddsi/ddsi_rhc.h"
|
||||
#include "dds/ddsi/ddsi_entity_index.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsi/q_entity.h"
|
||||
|
||||
#define TOPIC_SAMPLE_CACHE_SIZE 4
|
||||
|
@ -59,7 +59,7 @@ static int cmp_topic_ptrs (const void *va, const void *vb)
|
|||
|
||||
static const ddsrt_avl_treedef_t tsc_large_td = DDSRT_AVL_TREEDEF_INITIALIZER_INDKEY (offsetof (struct topic_sample_cache_large_entry, avlnode), offsetof (struct topic_sample_cache_large_entry, topic), cmp_topic_ptrs, 0);
|
||||
|
||||
static void free_sample_after_store (struct q_globals *gv, struct ddsi_serdata *sample, struct ddsi_tkmap_instance *tk)
|
||||
static void free_sample_after_store (struct ddsi_domaingv *gv, struct ddsi_serdata *sample, struct ddsi_tkmap_instance *tk)
|
||||
{
|
||||
if (sample)
|
||||
{
|
||||
|
@ -77,12 +77,12 @@ static void topic_sample_cache_init (struct topic_sample_cache * __restrict tsc)
|
|||
static void free_large_entry (void *vnode, void *varg)
|
||||
{
|
||||
struct topic_sample_cache_large_entry *e = vnode;
|
||||
struct q_globals *gv = varg;
|
||||
struct ddsi_domaingv *gv = varg;
|
||||
free_sample_after_store (gv, e->sample, e->tk);
|
||||
ddsrt_free (e);
|
||||
}
|
||||
|
||||
static void topic_sample_cache_fini (struct topic_sample_cache * __restrict tsc, struct q_globals *gv)
|
||||
static void topic_sample_cache_fini (struct topic_sample_cache * __restrict tsc, struct ddsi_domaingv *gv)
|
||||
{
|
||||
for (uint32_t i = 0; i < tsc->n && i < TOPIC_SAMPLE_CACHE_SIZE; i++)
|
||||
if (tsc->topics[i] && tsc->samples[i].tk)
|
||||
|
@ -133,7 +133,7 @@ static void topic_sample_cache_store (struct topic_sample_cache * __restrict tsc
|
|||
tsc->n++;
|
||||
}
|
||||
|
||||
dds_return_t deliver_locally_one (struct q_globals *gv, struct entity_common *source_entity, bool source_entity_locked, const ddsi_guid_t *rdguid, const struct ddsi_writer_info *wrinfo, const struct deliver_locally_ops * __restrict ops, void *vsourceinfo)
|
||||
dds_return_t deliver_locally_one (struct ddsi_domaingv *gv, struct entity_common *source_entity, bool source_entity_locked, const ddsi_guid_t *rdguid, const struct ddsi_writer_info *wrinfo, const struct deliver_locally_ops * __restrict ops, void *vsourceinfo)
|
||||
{
|
||||
struct reader *rd = entidx_lookup_reader_guid (gv->entity_index, rdguid);
|
||||
if (rd == NULL)
|
||||
|
@ -166,7 +166,7 @@ dds_return_t deliver_locally_one (struct q_globals *gv, struct entity_common *so
|
|||
return DDS_RETCODE_OK;
|
||||
}
|
||||
|
||||
static dds_return_t deliver_locally_slowpath (struct q_globals *gv, struct entity_common *source_entity, bool source_entity_locked, const struct ddsi_writer_info *wrinfo, const struct deliver_locally_ops * __restrict ops, void *vsourceinfo)
|
||||
static dds_return_t deliver_locally_slowpath (struct ddsi_domaingv *gv, struct entity_common *source_entity, bool source_entity_locked, const struct ddsi_writer_info *wrinfo, const struct deliver_locally_ops * __restrict ops, void *vsourceinfo)
|
||||
{
|
||||
/* When deleting, pwr is no longer accessible via the hash
|
||||
tables, and consequently, a reader may be deleted without
|
||||
|
@ -209,7 +209,7 @@ static dds_return_t deliver_locally_slowpath (struct q_globals *gv, struct entit
|
|||
return DDS_RETCODE_OK;
|
||||
}
|
||||
|
||||
static dds_return_t deliver_locally_fastpath (struct q_globals *gv, struct entity_common *source_entity, bool source_entity_locked, struct local_reader_ary *fastpath_rdary, const struct ddsi_writer_info *wrinfo, const struct deliver_locally_ops * __restrict ops, void *vsourceinfo)
|
||||
static dds_return_t deliver_locally_fastpath (struct ddsi_domaingv *gv, struct entity_common *source_entity, bool source_entity_locked, struct local_reader_ary *fastpath_rdary, const struct ddsi_writer_info *wrinfo, const struct deliver_locally_ops * __restrict ops, void *vsourceinfo)
|
||||
{
|
||||
struct reader ** const rdary = fastpath_rdary->rdary;
|
||||
uint32_t i = 0;
|
||||
|
@ -243,7 +243,7 @@ static dds_return_t deliver_locally_fastpath (struct q_globals *gv, struct entit
|
|||
return DDS_RETCODE_OK;
|
||||
}
|
||||
|
||||
dds_return_t deliver_locally_allinsync (struct q_globals *gv, struct entity_common *source_entity, bool source_entity_locked, struct local_reader_ary *fastpath_rdary, const struct ddsi_writer_info *wrinfo, const struct deliver_locally_ops * __restrict ops, void *vsourceinfo)
|
||||
dds_return_t deliver_locally_allinsync (struct ddsi_domaingv *gv, struct entity_common *source_entity, bool source_entity_locked, struct local_reader_ary *fastpath_rdary, const struct ddsi_writer_info *wrinfo, const struct deliver_locally_ops * __restrict ops, void *vsourceinfo)
|
||||
{
|
||||
dds_return_t rc;
|
||||
/* FIXME: Retry loop for re-delivery of rejected reliable samples is a bad hack
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "dds/ddsrt/avl.h"
|
||||
#include "dds/ddsi/ddsi_entity_index.h"
|
||||
#include "dds/ddsi/q_config.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsi/q_entity.h"
|
||||
#include "dds/ddsi/q_gc.h"
|
||||
#include "dds/ddsi/q_rtps.h" /* guid_t */
|
||||
|
@ -220,13 +220,13 @@ static void gc_buckets_cb (struct gcreq *gcreq)
|
|||
|
||||
static void gc_buckets (void *bs, void *varg)
|
||||
{
|
||||
struct q_globals *gv = varg;
|
||||
struct ddsi_domaingv *gv = varg;
|
||||
struct gcreq *gcreq = gcreq_new (gv->gcreq_queue, gc_buckets_cb);
|
||||
gcreq->arg = bs;
|
||||
gcreq_enqueue (gcreq);
|
||||
}
|
||||
|
||||
struct entity_index *entity_index_new (struct q_globals *gv)
|
||||
struct entity_index *entity_index_new (struct ddsi_domaingv *gv)
|
||||
{
|
||||
struct entity_index *entidx;
|
||||
entidx = ddsrt_malloc (sizeof (*entidx));
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include "dds/ddsi/ddsi_ipaddr.h"
|
||||
#include "dds/ddsi/q_nwif.h"
|
||||
#include "dds/ddsi/q_config.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
|
||||
int ddsi_ipaddr_compare (const struct sockaddr *const sa1, const struct sockaddr *const sa2)
|
||||
{
|
||||
|
|
|
@ -49,7 +49,7 @@ nn_mtime_t lifespan_next_expired_locked (const struct lifespan_adm *lifespan_adm
|
|||
return (node != NULL) ? node->t_expire : NN_MTIME_NEVER;
|
||||
}
|
||||
|
||||
void lifespan_init (const struct q_globals *gv, struct lifespan_adm *lifespan_adm, size_t fh_offset, size_t fh_node_offset, sample_expired_cb_t sample_expired_cb)
|
||||
void lifespan_init (const struct ddsi_domaingv *gv, struct lifespan_adm *lifespan_adm, size_t fh_offset, size_t fh_node_offset, sample_expired_cb_t sample_expired_cb)
|
||||
{
|
||||
ddsrt_fibheap_init (&lifespan_fhdef, &lifespan_adm->ls_exp_heap);
|
||||
lifespan_adm->evt = qxev_callback (gv->xevents, NN_MTIME_NEVER, lifespan_rhc_node_exp, lifespan_adm);
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "dds/ddsi/ddsi_mcgroup.h"
|
||||
#include "dds/ddsi/q_config.h"
|
||||
#include "dds/ddsi/q_log.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsrt/avl.h"
|
||||
|
||||
struct nn_group_membership_node {
|
||||
|
@ -177,7 +177,7 @@ static int interface_in_recvips_p (const struct config_in_addr_node *recvips, co
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int joinleave_mcgroups (const struct q_globals *gv, ddsi_tran_conn_t conn, int join, const nn_locator_t *srcloc, const nn_locator_t *mcloc)
|
||||
static int joinleave_mcgroups (const struct ddsi_domaingv *gv, ddsi_tran_conn_t conn, int join, const nn_locator_t *srcloc, const nn_locator_t *mcloc)
|
||||
{
|
||||
int rc;
|
||||
switch (gv->recvips_mode)
|
||||
|
@ -223,7 +223,7 @@ static int joinleave_mcgroups (const struct q_globals *gv, ddsi_tran_conn_t conn
|
|||
return 0;
|
||||
}
|
||||
|
||||
int ddsi_join_mc (const struct q_globals *gv, struct nn_group_membership *mship, ddsi_tran_conn_t conn, const nn_locator_t *srcloc, const nn_locator_t *mcloc)
|
||||
int ddsi_join_mc (const struct ddsi_domaingv *gv, struct nn_group_membership *mship, ddsi_tran_conn_t conn, const nn_locator_t *srcloc, const nn_locator_t *mcloc)
|
||||
{
|
||||
/* FIXME: gv to be reduced; perhaps mship, recvips, interfaces, ownloc should be combined into a single struct */
|
||||
int ret;
|
||||
|
@ -242,7 +242,7 @@ int ddsi_join_mc (const struct q_globals *gv, struct nn_group_membership *mship,
|
|||
return ret;
|
||||
}
|
||||
|
||||
int ddsi_leave_mc (const struct q_globals *gv, struct nn_group_membership *mship, ddsi_tran_conn_t conn, const nn_locator_t *srcloc, const nn_locator_t *mcloc)
|
||||
int ddsi_leave_mc (const struct ddsi_domaingv *gv, struct nn_group_membership *mship, ddsi_tran_conn_t conn, const nn_locator_t *srcloc, const nn_locator_t *mcloc)
|
||||
{
|
||||
int ret;
|
||||
ddsrt_mutex_lock (&mship->lock);
|
||||
|
@ -282,7 +282,7 @@ void ddsi_transfer_group_membership (struct nn_group_membership *mship, ddsi_tra
|
|||
ddsrt_mutex_unlock (&mship->lock);
|
||||
}
|
||||
|
||||
int ddsi_rejoin_transferred_mcgroups (const struct q_globals *gv, struct nn_group_membership *mship, ddsi_tran_conn_t conn)
|
||||
int ddsi_rejoin_transferred_mcgroups (const struct ddsi_domaingv *gv, struct nn_group_membership *mship, ddsi_tran_conn_t conn)
|
||||
{
|
||||
/* FIXME: see gv should be reduced; perhaps recvips, ownloc, mship, interfaces should be a single struct */
|
||||
struct nn_group_membership_node *n, min, max;
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include "dds/ddsi/q_bswap.h"
|
||||
#include "dds/ddsi/q_entity.h"
|
||||
#include "dds/ddsi/ddsi_entity_index.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsi/q_lease.h"
|
||||
#include "dds/ddsi/q_log.h"
|
||||
#include "dds/ddsi/q_misc.h"
|
||||
|
@ -31,7 +31,7 @@
|
|||
|
||||
#include "dds/ddsi/sysdeps.h"
|
||||
|
||||
static void debug_print_rawdata (const struct q_globals *gv, const char *msg, const void *data, size_t len)
|
||||
static void debug_print_rawdata (const struct ddsi_domaingv *gv, const char *msg, const void *data, size_t len)
|
||||
{
|
||||
const unsigned char *c = data;
|
||||
size_t i;
|
||||
|
@ -46,7 +46,7 @@ static void debug_print_rawdata (const struct q_globals *gv, const char *msg, co
|
|||
GVTRACE (">");
|
||||
}
|
||||
|
||||
void write_pmd_message_guid (struct q_globals * const gv, struct ddsi_guid *pp_guid, unsigned pmd_kind)
|
||||
void write_pmd_message_guid (struct ddsi_domaingv * const gv, struct ddsi_guid *pp_guid, unsigned pmd_kind)
|
||||
{
|
||||
struct thread_state1 * const ts1 = lookup_thread_state ();
|
||||
struct lease *lease;
|
||||
|
@ -66,7 +66,7 @@ void write_pmd_message_guid (struct q_globals * const gv, struct ddsi_guid *pp_g
|
|||
void write_pmd_message (struct thread_state1 * const ts1, struct nn_xpack *xp, struct participant *pp, unsigned pmd_kind)
|
||||
{
|
||||
#define PMD_DATA_LENGTH 1
|
||||
struct q_globals * const gv = pp->e.gv;
|
||||
struct ddsi_domaingv * const gv = pp->e.gv;
|
||||
struct writer *wr;
|
||||
union {
|
||||
ParticipantMessageData_t pmd;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "dds/ddsi/q_config.h"
|
||||
#include "dds/ddsi/q_log.h"
|
||||
#include "dds/ddsi/q_pcap.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsrt/atomics.h"
|
||||
#include "dds/ddsrt/heap.h"
|
||||
#include "dds/ddsrt/log.h"
|
||||
|
@ -362,7 +362,7 @@ static int ddsi_raweth_is_valid_port (ddsi_tran_factory_t fact, uint32_t port)
|
|||
return (port >= 1 && port <= 65535);
|
||||
}
|
||||
|
||||
int ddsi_raweth_init (struct q_globals *gv)
|
||||
int ddsi_raweth_init (struct ddsi_domaingv *gv)
|
||||
{
|
||||
struct ddsi_tran_factory *fact = ddsrt_malloc (sizeof (*fact));
|
||||
memset (fact, 0, sizeof (*fact));
|
||||
|
@ -391,6 +391,6 @@ int ddsi_raweth_init (struct q_globals *gv)
|
|||
|
||||
#else
|
||||
|
||||
int ddsi_raweth_init (struct q_globals *gv) { (void) gv; return 0; }
|
||||
int ddsi_raweth_init (struct ddsi_domaingv *gv) { (void) gv; return 0; }
|
||||
|
||||
#endif /* defined __linux */
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "dds/ddsi/ddsi_tkmap.h"
|
||||
#include "dds__stream.h"
|
||||
#include "dds/ddsi/q_radmin.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsi/ddsi_serdata_default.h"
|
||||
|
||||
#if DDSRT_ENDIAN == DDSRT_LITTLE_ENDIAN
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "dds/ddsi/ddsi_iid.h"
|
||||
#include "dds/ddsi/ddsi_sertopic.h"
|
||||
#include "dds/ddsi/ddsi_serdata.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
|
||||
bool ddsi_sertopic_equal (const struct ddsi_sertopic *a, const struct ddsi_sertopic *b)
|
||||
{
|
||||
|
@ -58,7 +58,7 @@ struct ddsi_sertopic *ddsi_sertopic_ref (const struct ddsi_sertopic *sertopic_co
|
|||
return sertopic;
|
||||
}
|
||||
|
||||
struct ddsi_sertopic *ddsi_sertopic_lookup_locked (struct q_globals *gv, const struct ddsi_sertopic *sertopic_template)
|
||||
struct ddsi_sertopic *ddsi_sertopic_lookup_locked (struct ddsi_domaingv *gv, const struct ddsi_sertopic *sertopic_template)
|
||||
{
|
||||
struct ddsi_sertopic *sertopic = ddsrt_hh_lookup (gv->sertopics, sertopic_template);
|
||||
#ifndef NDEBUG
|
||||
|
@ -71,7 +71,7 @@ struct ddsi_sertopic *ddsi_sertopic_lookup_locked (struct q_globals *gv, const s
|
|||
return ddsi_sertopic_ref (sertopic);
|
||||
}
|
||||
|
||||
void ddsi_sertopic_register_locked (struct q_globals *gv, struct ddsi_sertopic *sertopic)
|
||||
void ddsi_sertopic_register_locked (struct ddsi_domaingv *gv, struct ddsi_sertopic *sertopic)
|
||||
{
|
||||
assert (sertopic->gv == NULL);
|
||||
assert (sertopic->iid == 0);
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "dds/ddsrt/sockets.h"
|
||||
#include "dds/ddsrt/sync.h"
|
||||
#include "dds/ddsrt/threads.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
|
||||
static SSL_CTX *ddsi_ssl_ctx = NULL;
|
||||
static bool ddsi_ssl_allow_self_signed_hack = false;
|
||||
|
@ -38,7 +38,7 @@ static SSL *ddsi_ssl_new (void)
|
|||
return SSL_new (ddsi_ssl_ctx);
|
||||
}
|
||||
|
||||
static void ddsi_ssl_error (const struct q_globals *gv, SSL *ssl, const char *str, int err)
|
||||
static void ddsi_ssl_error (const struct ddsi_domaingv *gv, SSL *ssl, const char *str, int err)
|
||||
{
|
||||
char buff[128];
|
||||
ERR_error_string ((unsigned) SSL_get_error (ssl, err), buff);
|
||||
|
@ -178,7 +178,7 @@ static void ddsi_ssl_dynlock_destroy (CRYPTO_dynlock_value *lock, const char *fi
|
|||
|
||||
static int ddsi_ssl_password (char *buf, int num, int rwflag, void *udata)
|
||||
{
|
||||
struct q_globals *gv = udata;
|
||||
struct ddsi_domaingv *gv = udata;
|
||||
(void) rwflag;
|
||||
if (num < 0 || (size_t) num < strlen (gv->config.ssl_key_pass) + 1)
|
||||
return 0;
|
||||
|
@ -188,7 +188,7 @@ static int ddsi_ssl_password (char *buf, int num, int rwflag, void *udata)
|
|||
return (int) strlen (gv->config.ssl_key_pass);
|
||||
}
|
||||
|
||||
static SSL_CTX *ddsi_ssl_ctx_init (struct q_globals *gv)
|
||||
static SSL_CTX *ddsi_ssl_ctx_init (struct ddsi_domaingv *gv)
|
||||
{
|
||||
SSL_CTX *ctx = SSL_CTX_new (SSLv23_method ());
|
||||
unsigned disallow_TLSv1_2;
|
||||
|
@ -281,7 +281,7 @@ fail:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static void dds_report_tls_version (const struct q_globals *gv, const SSL *ssl, const char *oper)
|
||||
static void dds_report_tls_version (const struct ddsi_domaingv *gv, const SSL *ssl, const char *oper)
|
||||
{
|
||||
if (ssl)
|
||||
{
|
||||
|
@ -292,7 +292,7 @@ static void dds_report_tls_version (const struct q_globals *gv, const SSL *ssl,
|
|||
}
|
||||
}
|
||||
|
||||
static SSL *ddsi_ssl_connect (const struct q_globals *gv, ddsrt_socket_t sock)
|
||||
static SSL *ddsi_ssl_connect (const struct ddsi_domaingv *gv, ddsrt_socket_t sock)
|
||||
{
|
||||
SSL *ssl;
|
||||
int err;
|
||||
|
@ -326,7 +326,7 @@ static BIO *ddsi_ssl_listen (ddsrt_socket_t sock)
|
|||
return bio;
|
||||
}
|
||||
|
||||
static SSL *ddsi_ssl_accept (const struct q_globals *gv, BIO *bio, ddsrt_socket_t *sock)
|
||||
static SSL *ddsi_ssl_accept (const struct ddsi_domaingv *gv, BIO *bio, ddsrt_socket_t *sock)
|
||||
{
|
||||
SSL *ssl = NULL;
|
||||
BIO *nbio;
|
||||
|
@ -350,7 +350,7 @@ static SSL *ddsi_ssl_accept (const struct q_globals *gv, BIO *bio, ddsrt_socket_
|
|||
return ssl;
|
||||
}
|
||||
|
||||
static bool ddsi_ssl_init (struct q_globals *gv)
|
||||
static bool ddsi_ssl_init (struct ddsi_domaingv *gv)
|
||||
{
|
||||
/* FIXME: allocate this stuff ... don't copy gv into a global variable ... */
|
||||
ERR_load_BIO_strings ();
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "dds/ddsi/q_config.h"
|
||||
#include "dds/ddsi/q_log.h"
|
||||
#include "dds/ddsi/q_entity.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
|
||||
#define INVALID_PORT (~0u)
|
||||
|
||||
|
@ -165,7 +165,7 @@ static void ddsi_tcp_sock_free (const struct ddsrt_log_cfg *logcfg, ddsrt_socket
|
|||
}
|
||||
}
|
||||
|
||||
static void ddsi_tcp_sock_new (ddsrt_socket_t *sock, unsigned short port, const struct q_globals *gv)
|
||||
static void ddsi_tcp_sock_new (ddsrt_socket_t *sock, unsigned short port, const struct ddsi_domaingv *gv)
|
||||
{
|
||||
if (make_socket (sock, port, true, true, gv) != 0)
|
||||
{
|
||||
|
@ -1057,7 +1057,7 @@ static int ddsi_tcp_is_valid_port (ddsi_tran_factory_t fact, uint32_t port)
|
|||
return (port <= 65535);
|
||||
}
|
||||
|
||||
int ddsi_tcp_init (struct q_globals *gv)
|
||||
int ddsi_tcp_init (struct ddsi_domaingv *gv)
|
||||
{
|
||||
struct ddsi_tran_factory_tcp *fact = ddsrt_malloc (sizeof (*fact));
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "dds/ddsi/q_thread.h"
|
||||
#include "dds/ddsi/q_time.h"
|
||||
#include "dds/ddsi/q_unused.h"
|
||||
#include "dds/ddsi/q_globals.h" /* for mattr, cattr */
|
||||
#include "dds/ddsi/ddsi_domaingv.h" /* for mattr, cattr */
|
||||
#include "dds/ddsi/q_receive.h"
|
||||
|
||||
struct alive_vt {
|
||||
|
@ -31,7 +31,7 @@ struct alive_vt {
|
|||
};
|
||||
|
||||
struct threadmon_domain {
|
||||
const struct q_globals *gv;
|
||||
const struct ddsi_domaingv *gv;
|
||||
unsigned n_not_alive;
|
||||
size_t msgpos;
|
||||
char msg[2048];
|
||||
|
@ -51,7 +51,7 @@ struct ddsi_threadmon {
|
|||
struct ddsrt_hh *domains;
|
||||
};
|
||||
|
||||
static struct threadmon_domain *find_domain (struct ddsi_threadmon *sl, const struct q_globals *gv)
|
||||
static struct threadmon_domain *find_domain (struct ddsi_threadmon *sl, const struct ddsi_domaingv *gv)
|
||||
{
|
||||
struct threadmon_domain dummy;
|
||||
dummy.gv = gv;
|
||||
|
@ -101,7 +101,7 @@ static uint32_t threadmon_thread (struct ddsi_threadmon *sl)
|
|||
|
||||
vtime_t vt = ddsrt_atomic_ld32 (&thread_states.ts[i].vtime);
|
||||
ddsrt_atomic_fence_ldld ();
|
||||
struct q_globals const * const gv = ddsrt_atomic_ldvoidp (&thread_states.ts[i].gv);
|
||||
struct ddsi_domaingv const * const gv = ddsrt_atomic_ldvoidp (&thread_states.ts[i].gv);
|
||||
struct threadmon_domain *tmdom = find_domain (sl, gv);
|
||||
if (tmdom == NULL)
|
||||
continue;
|
||||
|
@ -238,7 +238,7 @@ dds_return_t ddsi_threadmon_start (struct ddsi_threadmon *sl, const char *name)
|
|||
return DDS_RETCODE_ERROR;
|
||||
}
|
||||
|
||||
void ddsi_threadmon_register_domain (struct ddsi_threadmon *sl, const struct q_globals *gv)
|
||||
void ddsi_threadmon_register_domain (struct ddsi_threadmon *sl, const struct ddsi_domaingv *gv)
|
||||
{
|
||||
if (gv->config.liveliness_monitoring)
|
||||
{
|
||||
|
@ -256,7 +256,7 @@ void ddsi_threadmon_register_domain (struct ddsi_threadmon *sl, const struct q_g
|
|||
}
|
||||
}
|
||||
|
||||
void ddsi_threadmon_unregister_domain (struct ddsi_threadmon *sl, const struct q_globals *gv)
|
||||
void ddsi_threadmon_unregister_domain (struct ddsi_threadmon *sl, const struct ddsi_domaingv *gv)
|
||||
{
|
||||
if (gv->config.liveliness_monitoring)
|
||||
{
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include "dds/ddsi/q_thread.h"
|
||||
#include "dds/ddsi/q_unused.h"
|
||||
#include "dds/ddsi/q_gc.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsi/q_config.h"
|
||||
#include "dds/ddsi/ddsi_iid.h"
|
||||
#include "dds/ddsi/ddsi_tkmap.h"
|
||||
|
@ -32,7 +32,7 @@
|
|||
struct ddsi_tkmap
|
||||
{
|
||||
struct ddsrt_chh *m_hh;
|
||||
struct q_globals *gv;
|
||||
struct ddsi_domaingv *gv;
|
||||
ddsrt_mutex_t m_lock;
|
||||
ddsrt_cond_t m_cond;
|
||||
};
|
||||
|
@ -86,7 +86,7 @@ static int dds_tk_equals_void (const void *a, const void *b)
|
|||
return dds_tk_equals (a, b);
|
||||
}
|
||||
|
||||
struct ddsi_tkmap *ddsi_tkmap_new (struct q_globals *gv)
|
||||
struct ddsi_tkmap *ddsi_tkmap_new (struct ddsi_domaingv *gv)
|
||||
{
|
||||
struct ddsi_tkmap *tkmap = dds_alloc (sizeof (*tkmap));
|
||||
tkmap->m_hh = ddsrt_chh_new (1, dds_tk_hash_void, dds_tk_equals_void, gc_buckets, tkmap);
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "dds/ddsi/ddsi_ipaddr.h"
|
||||
#include "dds/ddsi/q_config.h"
|
||||
#include "dds/ddsi/q_log.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
|
||||
extern inline uint32_t ddsi_conn_type (ddsi_tran_conn_t conn);
|
||||
extern inline uint32_t ddsi_conn_port (ddsi_tran_conn_t conn);
|
||||
|
@ -37,13 +37,13 @@ extern inline ddsi_tran_conn_t ddsi_listener_accept (ddsi_tran_listener_t listen
|
|||
extern inline ssize_t ddsi_conn_read (ddsi_tran_conn_t conn, unsigned char * buf, size_t len, bool allow_spurious, nn_locator_t *srcloc);
|
||||
extern inline ssize_t ddsi_conn_write (ddsi_tran_conn_t conn, const nn_locator_t *dst, size_t niov, const ddsrt_iovec_t *iov, uint32_t flags);
|
||||
|
||||
void ddsi_factory_add (struct q_globals *gv, ddsi_tran_factory_t factory)
|
||||
void ddsi_factory_add (struct ddsi_domaingv *gv, ddsi_tran_factory_t factory)
|
||||
{
|
||||
factory->m_factory = gv->ddsi_tran_factories;
|
||||
gv->ddsi_tran_factories = factory;
|
||||
}
|
||||
|
||||
ddsi_tran_factory_t ddsi_factory_find (const struct q_globals *gv, const char *type)
|
||||
ddsi_tran_factory_t ddsi_factory_find (const struct ddsi_domaingv *gv, const char *type)
|
||||
{
|
||||
/* FIXME: should speed up */
|
||||
ddsi_tran_factory_t factory = gv->ddsi_tran_factories;
|
||||
|
@ -60,7 +60,7 @@ ddsi_tran_factory_t ddsi_factory_find (const struct q_globals *gv, const char *t
|
|||
return factory;
|
||||
}
|
||||
|
||||
void ddsi_tran_factories_fini (struct q_globals *gv)
|
||||
void ddsi_tran_factories_fini (struct ddsi_domaingv *gv)
|
||||
{
|
||||
ddsi_tran_factory_t factory;
|
||||
while ((factory = gv->ddsi_tran_factories) != NULL)
|
||||
|
@ -73,7 +73,7 @@ void ddsi_tran_factories_fini (struct q_globals *gv)
|
|||
}
|
||||
}
|
||||
|
||||
static ddsi_tran_factory_t ddsi_factory_find_with_len (const struct q_globals *gv, const char *type, size_t len)
|
||||
static ddsi_tran_factory_t ddsi_factory_find_with_len (const struct ddsi_domaingv *gv, const char *type, size_t len)
|
||||
{
|
||||
/* FIXME: should speed up */
|
||||
ddsi_tran_factory_t factory = gv->ddsi_tran_factories;
|
||||
|
@ -91,7 +91,7 @@ static ddsi_tran_factory_t ddsi_factory_find_with_len (const struct q_globals *g
|
|||
}
|
||||
|
||||
ddsrt_attribute_no_sanitize (("thread"))
|
||||
ddsi_tran_factory_t ddsi_factory_find_supported_kind (const struct q_globals *gv, int32_t kind)
|
||||
ddsi_tran_factory_t ddsi_factory_find_supported_kind (const struct ddsi_domaingv *gv, int32_t kind)
|
||||
{
|
||||
/* FIXME: MUST speed up */
|
||||
ddsi_tran_factory_t factory;
|
||||
|
@ -237,13 +237,13 @@ void ddsi_listener_free (ddsi_tran_listener_t listener)
|
|||
}
|
||||
}
|
||||
|
||||
int ddsi_is_mcaddr (const struct q_globals *gv, const nn_locator_t *loc)
|
||||
int ddsi_is_mcaddr (const struct ddsi_domaingv *gv, const nn_locator_t *loc)
|
||||
{
|
||||
ddsi_tran_factory_t tran = ddsi_factory_find_supported_kind (gv, loc->kind);
|
||||
return tran ? tran->m_is_mcaddr_fn (tran, loc) : 0;
|
||||
}
|
||||
|
||||
int ddsi_is_ssm_mcaddr (const struct q_globals *gv, const nn_locator_t *loc)
|
||||
int ddsi_is_ssm_mcaddr (const struct ddsi_domaingv *gv, const nn_locator_t *loc)
|
||||
{
|
||||
ddsi_tran_factory_t tran = ddsi_factory_find_supported_kind(gv, loc->kind);
|
||||
if (tran && tran->m_is_ssm_mcaddr_fn != 0)
|
||||
|
@ -259,7 +259,7 @@ enum ddsi_nearby_address_result ddsi_is_nearby_address (const nn_locator_t *loc,
|
|||
return ownloc->tran->m_is_nearby_address_fn (loc, ownloc, ninterf, interf);
|
||||
}
|
||||
|
||||
enum ddsi_locator_from_string_result ddsi_locator_from_string (const struct q_globals *gv, nn_locator_t *loc, const char *str, ddsi_tran_factory_t default_factory)
|
||||
enum ddsi_locator_from_string_result ddsi_locator_from_string (const struct ddsi_domaingv *gv, nn_locator_t *loc, const char *str, ddsi_tran_factory_t default_factory)
|
||||
{
|
||||
const char *sep = strchr(str, '/');
|
||||
ddsi_tran_factory_t tran;
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "dds/ddsi/q_config.h"
|
||||
#include "dds/ddsi/q_log.h"
|
||||
#include "dds/ddsi/q_pcap.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
|
||||
typedef struct ddsi_udp_conn {
|
||||
struct ddsi_tran_conn m_base;
|
||||
|
@ -472,7 +472,7 @@ static int ddsi_udp_is_valid_port (ddsi_tran_factory_t fact, uint32_t port)
|
|||
return (port <= 65535);
|
||||
}
|
||||
|
||||
int ddsi_udp_init (struct q_globals *gv)
|
||||
int ddsi_udp_init (struct ddsi_domaingv *gv)
|
||||
{
|
||||
struct ddsi_tran_factory *fact = ddsrt_malloc (sizeof (*fact));
|
||||
memset (fact, 0, sizeof (*fact));
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "dds/ddsi/q_misc.h"
|
||||
#include "dds/ddsi/q_config.h"
|
||||
#include "dds/ddsi/q_addrset.h"
|
||||
#include "dds/ddsi/q_globals.h" /* gv.mattr */
|
||||
#include "dds/ddsi/ddsi_domaingv.h" /* gv.mattr */
|
||||
#include "dds/ddsi/ddsi_udp.h" /* nn_mc4gen_address_t */
|
||||
|
||||
/* So what does one do with const & mutexes? I need to take lock in a
|
||||
|
@ -44,7 +44,7 @@ static int compare_locators_vwrap (const void *va, const void *vb);
|
|||
static const ddsrt_avl_ctreedef_t addrset_treedef =
|
||||
DDSRT_AVL_CTREEDEF_INITIALIZER (offsetof (struct addrset_node, avlnode), offsetof (struct addrset_node, loc), compare_locators_vwrap, 0);
|
||||
|
||||
static int add_addresses_to_addrset_1 (const struct q_globals *gv, struct addrset *as, const char *ip, int port_mode, const char *msgtag, int req_mc, int mcgen_base, int mcgen_count, int mcgen_idx)
|
||||
static int add_addresses_to_addrset_1 (const struct ddsi_domaingv *gv, struct addrset *as, const char *ip, int port_mode, const char *msgtag, int req_mc, int mcgen_base, int mcgen_count, int mcgen_idx)
|
||||
{
|
||||
char buf[DDSI_LOCSTRLEN];
|
||||
nn_locator_t loc;
|
||||
|
@ -128,7 +128,7 @@ static int add_addresses_to_addrset_1 (const struct q_globals *gv, struct addrse
|
|||
return 0;
|
||||
}
|
||||
|
||||
int add_addresses_to_addrset (const struct q_globals *gv, struct addrset *as, const char *addrs, int port_mode, const char *msgtag, int req_mc)
|
||||
int add_addresses_to_addrset (const struct ddsi_domaingv *gv, struct addrset *as, const char *addrs, int port_mode, const char *msgtag, int req_mc)
|
||||
{
|
||||
/* port_mode: -1 => take from string, if 0 & unicast, add for a range of participant indices;
|
||||
port_mode >= 0 => always set port to port_mode
|
||||
|
@ -246,7 +246,7 @@ int is_unspec_locator (const nn_locator_t *loc)
|
|||
}
|
||||
|
||||
#ifdef DDSI_INCLUDE_SSM
|
||||
int addrset_contains_ssm (const struct q_globals *gv, const struct addrset *as)
|
||||
int addrset_contains_ssm (const struct ddsi_domaingv *gv, const struct addrset *as)
|
||||
{
|
||||
struct addrset_node *n;
|
||||
ddsrt_avl_citer_t it;
|
||||
|
@ -263,7 +263,7 @@ int addrset_contains_ssm (const struct q_globals *gv, const struct addrset *as)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int addrset_any_ssm (const struct q_globals *gv, const struct addrset *as, nn_locator_t *dst)
|
||||
int addrset_any_ssm (const struct ddsi_domaingv *gv, const struct addrset *as, nn_locator_t *dst)
|
||||
{
|
||||
struct addrset_node *n;
|
||||
ddsrt_avl_citer_t it;
|
||||
|
@ -281,7 +281,7 @@ int addrset_any_ssm (const struct q_globals *gv, const struct addrset *as, nn_lo
|
|||
return 0;
|
||||
}
|
||||
|
||||
int addrset_any_non_ssm_mc (const struct q_globals *gv, const struct addrset *as, nn_locator_t *dst)
|
||||
int addrset_any_non_ssm_mc (const struct ddsi_domaingv *gv, const struct addrset *as, nn_locator_t *dst)
|
||||
{
|
||||
struct addrset_node *n;
|
||||
ddsrt_avl_citer_t it;
|
||||
|
@ -309,7 +309,7 @@ int addrset_purge (struct addrset *as)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void add_to_addrset (const struct q_globals *gv, struct addrset *as, const nn_locator_t *loc)
|
||||
void add_to_addrset (const struct ddsi_domaingv *gv, struct addrset *as, const nn_locator_t *loc)
|
||||
{
|
||||
if (!is_unspec_locator (loc))
|
||||
{
|
||||
|
@ -326,7 +326,7 @@ void add_to_addrset (const struct q_globals *gv, struct addrset *as, const nn_lo
|
|||
}
|
||||
}
|
||||
|
||||
void remove_from_addrset (const struct q_globals *gv, struct addrset *as, const nn_locator_t *loc)
|
||||
void remove_from_addrset (const struct ddsi_domaingv *gv, struct addrset *as, const nn_locator_t *loc)
|
||||
{
|
||||
ddsrt_avl_dpath_t path;
|
||||
ddsrt_avl_ctree_t *tree = ddsi_is_mcaddr (gv, loc) ? &as->mcaddrs : &as->ucaddrs;
|
||||
|
@ -340,7 +340,7 @@ void remove_from_addrset (const struct q_globals *gv, struct addrset *as, const
|
|||
UNLOCK (as);
|
||||
}
|
||||
|
||||
void copy_addrset_into_addrset_uc (const struct q_globals *gv, struct addrset *as, const struct addrset *asadd)
|
||||
void copy_addrset_into_addrset_uc (const struct ddsi_domaingv *gv, struct addrset *as, const struct addrset *asadd)
|
||||
{
|
||||
struct addrset_node *n;
|
||||
ddsrt_avl_citer_t it;
|
||||
|
@ -350,7 +350,7 @@ void copy_addrset_into_addrset_uc (const struct q_globals *gv, struct addrset *a
|
|||
UNLOCK (asadd);
|
||||
}
|
||||
|
||||
void copy_addrset_into_addrset_mc (const struct q_globals *gv, struct addrset *as, const struct addrset *asadd)
|
||||
void copy_addrset_into_addrset_mc (const struct ddsi_domaingv *gv, struct addrset *as, const struct addrset *asadd)
|
||||
{
|
||||
struct addrset_node *n;
|
||||
ddsrt_avl_citer_t it;
|
||||
|
@ -360,14 +360,14 @@ void copy_addrset_into_addrset_mc (const struct q_globals *gv, struct addrset *a
|
|||
UNLOCK (asadd);
|
||||
}
|
||||
|
||||
void copy_addrset_into_addrset (const struct q_globals *gv, struct addrset *as, const struct addrset *asadd)
|
||||
void copy_addrset_into_addrset (const struct ddsi_domaingv *gv, struct addrset *as, const struct addrset *asadd)
|
||||
{
|
||||
copy_addrset_into_addrset_uc (gv, as, asadd);
|
||||
copy_addrset_into_addrset_mc (gv, as, asadd);
|
||||
}
|
||||
|
||||
#ifdef DDSI_INCLUDE_SSM
|
||||
void copy_addrset_into_addrset_no_ssm_mc (const struct q_globals *gv, struct addrset *as, const struct addrset *asadd)
|
||||
void copy_addrset_into_addrset_no_ssm_mc (const struct ddsi_domaingv *gv, struct addrset *as, const struct addrset *asadd)
|
||||
{
|
||||
struct addrset_node *n;
|
||||
ddsrt_avl_citer_t it;
|
||||
|
@ -381,7 +381,7 @@ void copy_addrset_into_addrset_no_ssm_mc (const struct q_globals *gv, struct add
|
|||
|
||||
}
|
||||
|
||||
void copy_addrset_into_addrset_no_ssm (const struct q_globals *gv, struct addrset *as, const struct addrset *asadd)
|
||||
void copy_addrset_into_addrset_no_ssm (const struct ddsi_domaingv *gv, struct addrset *as, const struct addrset *asadd)
|
||||
{
|
||||
copy_addrset_into_addrset_uc (gv, as, asadd);
|
||||
copy_addrset_into_addrset_no_ssm_mc (gv, as, asadd);
|
||||
|
@ -549,19 +549,19 @@ int addrset_forone (struct addrset *as, addrset_forone_fun_t f, void *arg)
|
|||
struct log_addrset_helper_arg
|
||||
{
|
||||
uint32_t tf;
|
||||
struct q_globals *gv;
|
||||
struct ddsi_domaingv *gv;
|
||||
};
|
||||
|
||||
static void log_addrset_helper (const nn_locator_t *n, void *varg)
|
||||
{
|
||||
const struct log_addrset_helper_arg *arg = varg;
|
||||
const struct q_globals *gv = arg->gv;
|
||||
const struct ddsi_domaingv *gv = arg->gv;
|
||||
char buf[DDSI_LOCSTRLEN];
|
||||
if (gv->logconfig.c.mask & arg->tf)
|
||||
GVLOG (arg->tf, " %s", ddsi_locator_to_string (buf, sizeof(buf), n));
|
||||
}
|
||||
|
||||
void nn_log_addrset (struct q_globals *gv, uint32_t tf, const char *prefix, const struct addrset *as)
|
||||
void nn_log_addrset (struct ddsi_domaingv *gv, uint32_t tf, const char *prefix, const struct addrset *as)
|
||||
{
|
||||
if (gv->logconfig.c.mask & tf)
|
||||
{
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "dds/ddsi/q_radmin.h"
|
||||
#include "dds/ddsi/ddsi_entity_index.h"
|
||||
#include "dds/ddsi/q_entity.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsi/q_xmsg.h"
|
||||
#include "dds/ddsi/q_bswap.h"
|
||||
#include "dds/ddsi/q_transmit.h"
|
||||
|
@ -45,7 +45,7 @@
|
|||
#include "dds/ddsi/q_feature_check.h"
|
||||
#include "dds/ddsi/ddsi_pmd.h"
|
||||
|
||||
static int get_locator (const struct q_globals *gv, nn_locator_t *loc, const nn_locators_t *locs, int uc_same_subnet)
|
||||
static int get_locator (const struct ddsi_domaingv *gv, nn_locator_t *loc, const nn_locators_t *locs, int uc_same_subnet)
|
||||
{
|
||||
struct nn_locators_one *l;
|
||||
nn_locator_t first, samenet;
|
||||
|
@ -159,7 +159,7 @@ static int get_locator (const struct q_globals *gv, nn_locator_t *loc, const nn_
|
|||
***
|
||||
*****************************************************************************/
|
||||
|
||||
static void maybe_add_pp_as_meta_to_as_disc (struct q_globals *gv, const struct addrset *as_meta)
|
||||
static void maybe_add_pp_as_meta_to_as_disc (struct ddsi_domaingv *gv, const struct addrset *as_meta)
|
||||
{
|
||||
if (addrset_empty_mc (as_meta) || !(gv->config.allowMulticast & AMC_SPDP))
|
||||
{
|
||||
|
@ -391,7 +391,7 @@ static unsigned pseudo_random_delay (const ddsi_guid_t *x, const ddsi_guid_t *y,
|
|||
return (unsigned) (m >> 32);
|
||||
}
|
||||
|
||||
static void respond_to_spdp (const struct q_globals *gv, const ddsi_guid_t *dest_proxypp_guid)
|
||||
static void respond_to_spdp (const struct ddsi_domaingv *gv, const ddsi_guid_t *dest_proxypp_guid)
|
||||
{
|
||||
struct entidx_enum_participant est;
|
||||
struct participant *pp;
|
||||
|
@ -418,7 +418,7 @@ static void respond_to_spdp (const struct q_globals *gv, const ddsi_guid_t *dest
|
|||
|
||||
static int handle_SPDP_dead (const struct receiver_state *rst, nn_wctime_t timestamp, const nn_plist_t *datap, unsigned statusinfo)
|
||||
{
|
||||
struct q_globals * const gv = rst->gv;
|
||||
struct ddsi_domaingv * const gv = rst->gv;
|
||||
ddsi_guid_t guid;
|
||||
|
||||
GVLOGDISC ("SPDP ST%x", statusinfo);
|
||||
|
@ -444,7 +444,7 @@ static int handle_SPDP_dead (const struct receiver_state *rst, nn_wctime_t times
|
|||
return 1;
|
||||
}
|
||||
|
||||
static void allowmulticast_aware_add_to_addrset (const struct q_globals *gv, uint32_t allow_multicast, struct addrset *as, const nn_locator_t *loc)
|
||||
static void allowmulticast_aware_add_to_addrset (const struct ddsi_domaingv *gv, uint32_t allow_multicast, struct addrset *as, const nn_locator_t *loc)
|
||||
{
|
||||
#if DDSI_INCLUDE_SSM
|
||||
if (ddsi_is_ssm_mcaddr (gv, loc))
|
||||
|
@ -478,7 +478,7 @@ static struct proxy_participant *find_ddsi2_proxy_participant (const struct enti
|
|||
return pp;
|
||||
}
|
||||
|
||||
static void make_participants_dependent_on_ddsi2 (struct q_globals *gv, const ddsi_guid_t *ddsi2guid, nn_wctime_t timestamp)
|
||||
static void make_participants_dependent_on_ddsi2 (struct ddsi_domaingv *gv, const ddsi_guid_t *ddsi2guid, nn_wctime_t timestamp)
|
||||
{
|
||||
struct entidx_enum_proxy_participant it;
|
||||
struct proxy_participant *pp, *d2pp;
|
||||
|
@ -516,7 +516,7 @@ static void make_participants_dependent_on_ddsi2 (struct q_globals *gv, const dd
|
|||
|
||||
static int handle_SPDP_alive (const struct receiver_state *rst, seqno_t seq, nn_wctime_t timestamp, const nn_plist_t *datap)
|
||||
{
|
||||
struct q_globals * const gv = rst->gv;
|
||||
struct ddsi_domaingv * const gv = rst->gv;
|
||||
const unsigned bes_sedp_announcer_mask =
|
||||
NN_DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_ANNOUNCER |
|
||||
NN_DISC_BUILTIN_ENDPOINT_PUBLICATION_ANNOUNCER;
|
||||
|
@ -799,7 +799,7 @@ static int handle_SPDP_alive (const struct receiver_state *rst, seqno_t seq, nn_
|
|||
|
||||
static void handle_SPDP (const struct receiver_state *rst, seqno_t seq, nn_wctime_t timestamp, unsigned statusinfo, const void *vdata, uint32_t len)
|
||||
{
|
||||
struct q_globals * const gv = rst->gv;
|
||||
struct ddsi_domaingv * const gv = rst->gv;
|
||||
const struct CDRHeader *data = vdata; /* built-ins not deserialized (yet) */
|
||||
if (data == NULL)
|
||||
{
|
||||
|
@ -846,7 +846,7 @@ static void handle_SPDP (const struct receiver_state *rst, seqno_t seq, nn_wctim
|
|||
}
|
||||
|
||||
struct add_locator_to_ps_arg {
|
||||
struct q_globals *gv;
|
||||
struct ddsi_domaingv *gv;
|
||||
nn_plist_t *ps;
|
||||
};
|
||||
|
||||
|
@ -894,7 +894,7 @@ static int sedp_write_endpoint
|
|||
const struct entity_common *common, const struct endpoint_common *epcommon,
|
||||
const dds_qos_t *xqos, struct addrset *as)
|
||||
{
|
||||
struct q_globals * const gv = wr->e.gv;
|
||||
struct ddsi_domaingv * const gv = wr->e.gv;
|
||||
const dds_qos_t *defqos = is_writer_entityid (epguid->entityid) ? &gv->default_xqos_wr : &gv->default_xqos_rd;
|
||||
struct nn_xmsg *mpayload;
|
||||
uint64_t qosdiff;
|
||||
|
@ -1049,7 +1049,7 @@ static const char *durability_to_string (dds_durability_kind_t k)
|
|||
return "undefined-durability";
|
||||
}
|
||||
|
||||
static struct proxy_participant *implicitly_create_proxypp (struct q_globals *gv, const ddsi_guid_t *ppguid, nn_plist_t *datap /* note: potentially modifies datap */, const ddsi_guid_prefix_t *src_guid_prefix, nn_vendorid_t vendorid, nn_wctime_t timestamp, seqno_t seq)
|
||||
static struct proxy_participant *implicitly_create_proxypp (struct ddsi_domaingv *gv, const ddsi_guid_t *ppguid, nn_plist_t *datap /* note: potentially modifies datap */, const ddsi_guid_prefix_t *src_guid_prefix, nn_vendorid_t vendorid, nn_wctime_t timestamp, seqno_t seq)
|
||||
{
|
||||
ddsi_guid_t privguid;
|
||||
nn_plist_t pp_plist;
|
||||
|
@ -1132,7 +1132,7 @@ static struct proxy_participant *implicitly_create_proxypp (struct q_globals *gv
|
|||
static void handle_SEDP_alive (const struct receiver_state *rst, seqno_t seq, nn_plist_t *datap /* note: potentially modifies datap */, const ddsi_guid_prefix_t *src_guid_prefix, nn_vendorid_t vendorid, nn_wctime_t timestamp)
|
||||
{
|
||||
#define E(msg, lbl) do { GVLOGDISC (msg); goto lbl; } while (0)
|
||||
struct q_globals * const gv = rst->gv;
|
||||
struct ddsi_domaingv * const gv = rst->gv;
|
||||
struct proxy_participant *pp;
|
||||
struct proxy_writer * pwr = NULL;
|
||||
struct proxy_reader * prd = NULL;
|
||||
|
@ -1326,7 +1326,7 @@ err:
|
|||
|
||||
static void handle_SEDP_dead (const struct receiver_state *rst, nn_plist_t *datap, nn_wctime_t timestamp)
|
||||
{
|
||||
struct q_globals * const gv = rst->gv;
|
||||
struct ddsi_domaingv * const gv = rst->gv;
|
||||
int res;
|
||||
if (!(datap->present & PP_ENDPOINT_GUID))
|
||||
{
|
||||
|
@ -1343,7 +1343,7 @@ static void handle_SEDP_dead (const struct receiver_state *rst, nn_plist_t *data
|
|||
|
||||
static void handle_SEDP (const struct receiver_state *rst, seqno_t seq, nn_wctime_t timestamp, unsigned statusinfo, const void *vdata, uint32_t len)
|
||||
{
|
||||
struct q_globals * const gv = rst->gv;
|
||||
struct ddsi_domaingv * const gv = rst->gv;
|
||||
const struct CDRHeader *data = vdata; /* built-ins not deserialized (yet) */
|
||||
GVLOGDISC ("SEDP ST%x", statusinfo);
|
||||
if (data == NULL)
|
||||
|
@ -1460,7 +1460,7 @@ static int defragment (unsigned char **datap, const struct nn_rdata *fragchain,
|
|||
|
||||
int builtins_dqueue_handler (const struct nn_rsample_info *sampleinfo, const struct nn_rdata *fragchain, UNUSED_ARG (const ddsi_guid_t *rdguid), UNUSED_ARG (void *qarg))
|
||||
{
|
||||
struct q_globals * const gv = sampleinfo->rst->gv;
|
||||
struct ddsi_domaingv * const gv = sampleinfo->rst->gv;
|
||||
struct proxy_writer *pwr;
|
||||
struct {
|
||||
struct CDRHeader cdr;
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "dds/ddsi/q_log.h"
|
||||
#include "dds/ddsi/q_plist.h"
|
||||
#include "dds/ddsi/ddsi_entity_index.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsi/q_addrset.h"
|
||||
#include "dds/ddsi/q_radmin.h"
|
||||
#include "dds/ddsi/q_ddsi_discovery.h"
|
||||
|
@ -52,7 +52,7 @@ struct debug_monitor {
|
|||
ddsi_tran_listener_t servsock;
|
||||
ddsrt_mutex_t lock;
|
||||
ddsrt_cond_t cond;
|
||||
struct q_globals *gv;
|
||||
struct ddsi_domaingv *gv;
|
||||
struct plugin *plugins;
|
||||
int stop;
|
||||
};
|
||||
|
@ -142,7 +142,7 @@ static int print_proxy_endpoint_common (ddsi_tran_conn_t conn, const char *label
|
|||
}
|
||||
|
||||
|
||||
static int print_participants (struct thread_state1 * const ts1, struct q_globals *gv, ddsi_tran_conn_t conn)
|
||||
static int print_participants (struct thread_state1 * const ts1, struct ddsi_domaingv *gv, ddsi_tran_conn_t conn)
|
||||
{
|
||||
struct entidx_enum_participant e;
|
||||
struct participant *p;
|
||||
|
@ -227,7 +227,7 @@ static int print_participants (struct thread_state1 * const ts1, struct q_global
|
|||
return x;
|
||||
}
|
||||
|
||||
static int print_proxy_participants (struct thread_state1 * const ts1, struct q_globals *gv, ddsi_tran_conn_t conn)
|
||||
static int print_proxy_participants (struct thread_state1 * const ts1, struct ddsi_domaingv *gv, ddsi_tran_conn_t conn)
|
||||
{
|
||||
struct entidx_enum_proxy_participant e;
|
||||
struct proxy_participant *p;
|
||||
|
@ -346,7 +346,7 @@ static uint32_t debmon_main (void *vdm)
|
|||
return 0;
|
||||
}
|
||||
|
||||
struct debug_monitor *new_debug_monitor (struct q_globals *gv, int32_t port)
|
||||
struct debug_monitor *new_debug_monitor (struct ddsi_domaingv *gv, int32_t port)
|
||||
{
|
||||
struct debug_monitor *dm;
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "dds/ddsi/q_lease.h"
|
||||
#include "dds/ddsi/q_qosmatch.h"
|
||||
#include "dds/ddsi/ddsi_entity_index.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsi/q_addrset.h"
|
||||
#include "dds/ddsi/q_xevent.h" /* qxev_spdp, &c. */
|
||||
#include "dds/ddsi/q_ddsi_discovery.h" /* spdp_write, &c. */
|
||||
|
@ -209,7 +209,7 @@ const ddsrt_fibheap_def_t ldur_fhdef = DDSRT_FIBHEAPDEF_INITIALIZER(offsetof (st
|
|||
/* used in (proxy)participant for writer liveliness monitoring */
|
||||
const ddsrt_fibheap_def_t lease_fhdef_pp = DDSRT_FIBHEAPDEF_INITIALIZER(offsetof (struct lease, pp_heapnode), compare_lease_tdur);
|
||||
|
||||
static void entity_common_init (struct entity_common *e, struct q_globals *gv, const struct ddsi_guid *guid, const char *name, enum entity_kind kind, nn_wctime_t tcreate, nn_vendorid_t vendorid, bool onlylocal)
|
||||
static void entity_common_init (struct entity_common *e, struct ddsi_domaingv *gv, const struct ddsi_guid *guid, const char *name, enum entity_kind kind, nn_wctime_t tcreate, nn_vendorid_t vendorid, bool onlylocal)
|
||||
{
|
||||
e->guid = *guid;
|
||||
e->kind = kind;
|
||||
|
@ -583,7 +583,7 @@ static void participant_remove_wr_lease_locked (struct participant * pp, struct
|
|||
}
|
||||
}
|
||||
|
||||
dds_return_t new_participant_guid (const ddsi_guid_t *ppguid, struct q_globals *gv, unsigned flags, const nn_plist_t *plist)
|
||||
dds_return_t new_participant_guid (const ddsi_guid_t *ppguid, struct ddsi_domaingv *gv, unsigned flags, const nn_plist_t *plist)
|
||||
{
|
||||
struct participant *pp;
|
||||
ddsi_guid_t subguid, group_guid;
|
||||
|
@ -816,7 +816,7 @@ dds_return_t new_participant_guid (const ddsi_guid_t *ppguid, struct q_globals *
|
|||
return 0;
|
||||
}
|
||||
|
||||
dds_return_t new_participant (ddsi_guid_t *p_ppguid, struct q_globals *gv, unsigned flags, const nn_plist_t *plist)
|
||||
dds_return_t new_participant (ddsi_guid_t *p_ppguid, struct ddsi_domaingv *gv, unsigned flags, const nn_plist_t *plist)
|
||||
{
|
||||
union { uint64_t u64; uint32_t u32[2]; } u;
|
||||
u.u32[0] = gv->ppguid_base.prefix.u[1];
|
||||
|
@ -837,7 +837,7 @@ void update_participant_plist (struct participant *pp, const nn_plist_t *plist)
|
|||
ddsrt_mutex_unlock (&pp->e.lock);
|
||||
}
|
||||
|
||||
static void delete_builtin_endpoint (struct q_globals *gv, const struct ddsi_guid *ppguid, unsigned entityid)
|
||||
static void delete_builtin_endpoint (struct ddsi_domaingv *gv, const struct ddsi_guid *ppguid, unsigned entityid)
|
||||
{
|
||||
ddsi_guid_t guid;
|
||||
guid.prefix = ppguid->prefix;
|
||||
|
@ -1009,7 +1009,7 @@ static void gc_delete_participant (struct gcreq *gcreq)
|
|||
unref_participant (pp, NULL);
|
||||
}
|
||||
|
||||
dds_return_t delete_participant (struct q_globals *gv, const struct ddsi_guid *ppguid)
|
||||
dds_return_t delete_participant (struct ddsi_domaingv *gv, const struct ddsi_guid *ppguid)
|
||||
{
|
||||
struct participant *pp;
|
||||
GVLOGDISC ("delete_participant("PGUIDFMT")\n", PGUID (*ppguid));
|
||||
|
@ -1266,7 +1266,7 @@ static void rebuild_make_locs_nrds(int **locs_nrds, int nreaders, int nlocs, con
|
|||
*locs_nrds = ln;
|
||||
}
|
||||
|
||||
static void rebuild_trace_covered(const struct q_globals *gv, int nreaders, int nlocs, const nn_locator_t *locs, const int *locs_nrds, const int8_t *covered)
|
||||
static void rebuild_trace_covered(const struct ddsi_domaingv *gv, int nreaders, int nlocs, const nn_locator_t *locs, const int *locs_nrds, const int8_t *covered)
|
||||
{
|
||||
int i, j;
|
||||
for (i = 0; i < nlocs; i++)
|
||||
|
@ -1283,7 +1283,7 @@ static void rebuild_trace_covered(const struct q_globals *gv, int nreaders, int
|
|||
}
|
||||
}
|
||||
|
||||
static int rebuild_select(const struct q_globals *gv, int nlocs, const nn_locator_t *locs, const int *locs_nrds, bool prefer_multicast)
|
||||
static int rebuild_select(const struct ddsi_domaingv *gv, int nlocs, const nn_locator_t *locs, const int *locs_nrds, bool prefer_multicast)
|
||||
{
|
||||
int i, j;
|
||||
if (nlocs == 0)
|
||||
|
@ -1306,7 +1306,7 @@ static int rebuild_select(const struct q_globals *gv, int nlocs, const nn_locato
|
|||
return (locs_nrds[j] > 0) ? j : -1;
|
||||
}
|
||||
|
||||
static void rebuild_add(const struct q_globals *gv, struct addrset *newas, int locidx, int nreaders, int nlocs, const nn_locator_t *locs, const int8_t *covered)
|
||||
static void rebuild_add(const struct ddsi_domaingv *gv, struct addrset *newas, int locidx, int nreaders, int nlocs, const nn_locator_t *locs, const int8_t *covered)
|
||||
{
|
||||
char str[DDSI_LOCATORSTRLEN];
|
||||
if (locs[locidx].kind != NN_LOCATOR_KIND_UDPv4MCGEN)
|
||||
|
@ -1409,7 +1409,7 @@ static void rebuild_writer_addrset (struct writer *wr)
|
|||
ELOGDISC (wr, "\n");
|
||||
}
|
||||
|
||||
void rebuild_or_clear_writer_addrsets (struct q_globals *gv, int rebuild)
|
||||
void rebuild_or_clear_writer_addrsets (struct ddsi_domaingv *gv, int rebuild)
|
||||
{
|
||||
struct entidx_enum_writer est;
|
||||
struct writer *wr;
|
||||
|
@ -1453,7 +1453,7 @@ static void free_wr_prd_match (struct wr_prd_match *m)
|
|||
}
|
||||
}
|
||||
|
||||
static void free_rd_pwr_match (struct q_globals *gv, struct rd_pwr_match *m)
|
||||
static void free_rd_pwr_match (struct ddsi_domaingv *gv, struct rd_pwr_match *m)
|
||||
{
|
||||
if (m)
|
||||
{
|
||||
|
@ -2658,7 +2658,7 @@ static void new_reader_writer_common (const struct ddsrt_log_cfg *logcfg, const
|
|||
topic ? topic->type_name : "(null)");
|
||||
}
|
||||
|
||||
static void endpoint_common_init (struct entity_common *e, struct endpoint_common *c, struct q_globals *gv, enum entity_kind kind, const struct ddsi_guid *guid, const struct ddsi_guid *group_guid, struct participant *pp, bool onlylocal)
|
||||
static void endpoint_common_init (struct entity_common *e, struct endpoint_common *c, struct ddsi_domaingv *gv, enum entity_kind kind, const struct ddsi_guid *guid, const struct ddsi_guid *group_guid, struct participant *pp, bool onlylocal)
|
||||
{
|
||||
entity_common_init (e, gv, guid, NULL, kind, now (), NN_VENDORID_ECLIPSE, pp->e.onlylocal || onlylocal);
|
||||
c->pp = ref_participant (pp, &e->guid);
|
||||
|
@ -3212,7 +3212,7 @@ static dds_return_t new_writer_guid (struct writer **wr_out, const struct ddsi_g
|
|||
return 0;
|
||||
}
|
||||
|
||||
dds_return_t new_writer (struct writer **wr_out, struct q_globals *gv, struct ddsi_guid *wrguid, const struct ddsi_guid *group_guid, const struct ddsi_guid *ppguid, const struct ddsi_sertopic *topic, const struct dds_qos *xqos, struct whc * whc, status_cb_t status_cb, void *status_cb_arg)
|
||||
dds_return_t new_writer (struct writer **wr_out, struct ddsi_domaingv *gv, struct ddsi_guid *wrguid, const struct ddsi_guid *group_guid, const struct ddsi_guid *ppguid, const struct ddsi_sertopic *topic, const struct dds_qos *xqos, struct whc * whc, status_cb_t status_cb, void *status_cb_arg)
|
||||
{
|
||||
struct participant *pp;
|
||||
dds_return_t rc;
|
||||
|
@ -3234,7 +3234,7 @@ dds_return_t new_writer (struct writer **wr_out, struct q_globals *gv, struct dd
|
|||
return new_writer_guid (wr_out, wrguid, group_guid, pp, topic, xqos, whc, status_cb, status_cb_arg);
|
||||
}
|
||||
|
||||
struct local_orphan_writer *new_local_orphan_writer (struct q_globals *gv, ddsi_entityid_t entityid, struct ddsi_sertopic *topic, const struct dds_qos *xqos, struct whc *whc)
|
||||
struct local_orphan_writer *new_local_orphan_writer (struct ddsi_domaingv *gv, ddsi_entityid_t entityid, struct ddsi_sertopic *topic, const struct dds_qos *xqos, struct whc *whc)
|
||||
{
|
||||
ddsi_guid_t guid;
|
||||
struct local_orphan_writer *lowr;
|
||||
|
@ -3360,7 +3360,7 @@ static void writer_set_state (struct writer *wr, enum writer_state newstate)
|
|||
wr->state = newstate;
|
||||
}
|
||||
|
||||
dds_return_t unblock_throttled_writer (struct q_globals *gv, const struct ddsi_guid *guid)
|
||||
dds_return_t unblock_throttled_writer (struct ddsi_domaingv *gv, const struct ddsi_guid *guid)
|
||||
{
|
||||
struct writer *wr;
|
||||
assert (is_writer_entityid (guid->entityid));
|
||||
|
@ -3419,7 +3419,7 @@ dds_return_t delete_writer_nolinger_locked (struct writer *wr)
|
|||
return 0;
|
||||
}
|
||||
|
||||
dds_return_t delete_writer_nolinger (struct q_globals *gv, const struct ddsi_guid *guid)
|
||||
dds_return_t delete_writer_nolinger (struct ddsi_domaingv *gv, const struct ddsi_guid *guid)
|
||||
{
|
||||
struct writer *wr;
|
||||
/* We take no care to ensure application writers are not deleted
|
||||
|
@ -3449,7 +3449,7 @@ void delete_local_orphan_writer (struct local_orphan_writer *lowr)
|
|||
ddsrt_mutex_unlock (&lowr->wr.e.lock);
|
||||
}
|
||||
|
||||
dds_return_t delete_writer (struct q_globals *gv, const struct ddsi_guid *guid)
|
||||
dds_return_t delete_writer (struct ddsi_domaingv *gv, const struct ddsi_guid *guid)
|
||||
{
|
||||
struct writer *wr;
|
||||
struct whc_state whcst;
|
||||
|
@ -3490,7 +3490,7 @@ dds_return_t delete_writer (struct q_globals *gv, const struct ddsi_guid *guid)
|
|||
/* READER ----------------------------------------------------------- */
|
||||
|
||||
#ifdef DDSI_INCLUDE_NETWORK_PARTITIONS
|
||||
static struct addrset *get_as_from_mapping (const struct q_globals *gv, const char *partition, const char *topic)
|
||||
static struct addrset *get_as_from_mapping (const struct ddsi_domaingv *gv, const char *partition, const char *topic)
|
||||
{
|
||||
struct config_partitionmapping_listelem *pm;
|
||||
struct addrset *as = new_addrset ();
|
||||
|
@ -3506,13 +3506,13 @@ static struct addrset *get_as_from_mapping (const struct q_globals *gv, const ch
|
|||
|
||||
struct join_leave_mcast_helper_arg {
|
||||
ddsi_tran_conn_t conn;
|
||||
struct q_globals *gv;
|
||||
struct ddsi_domaingv *gv;
|
||||
};
|
||||
|
||||
static void join_mcast_helper (const nn_locator_t *n, void *varg)
|
||||
{
|
||||
struct join_leave_mcast_helper_arg *arg = varg;
|
||||
struct q_globals *gv = arg->gv;
|
||||
struct ddsi_domaingv *gv = arg->gv;
|
||||
if (ddsi_is_mcaddr (gv, n))
|
||||
{
|
||||
if (n->kind != NN_LOCATOR_KIND_UDPv4MCGEN)
|
||||
|
@ -3554,7 +3554,7 @@ static void join_mcast_helper (const nn_locator_t *n, void *varg)
|
|||
static void leave_mcast_helper (const nn_locator_t *n, void *varg)
|
||||
{
|
||||
struct join_leave_mcast_helper_arg *arg = varg;
|
||||
struct q_globals *gv = arg->gv;
|
||||
struct ddsi_domaingv *gv = arg->gv;
|
||||
if (ddsi_is_mcaddr (gv, n))
|
||||
{
|
||||
if (n->kind != NN_LOCATOR_KIND_UDPv4MCGEN)
|
||||
|
@ -3733,7 +3733,7 @@ static dds_return_t new_reader_guid
|
|||
dds_return_t new_reader
|
||||
(
|
||||
struct reader **rd_out,
|
||||
struct q_globals *gv,
|
||||
struct ddsi_domaingv *gv,
|
||||
struct ddsi_guid *rdguid,
|
||||
const struct ddsi_guid *group_guid,
|
||||
const struct ddsi_guid *ppguid,
|
||||
|
@ -3812,7 +3812,7 @@ static void gc_delete_reader (struct gcreq *gcreq)
|
|||
ddsrt_free (rd);
|
||||
}
|
||||
|
||||
dds_return_t delete_reader (struct q_globals *gv, const struct ddsi_guid *guid)
|
||||
dds_return_t delete_reader (struct ddsi_domaingv *gv, const struct ddsi_guid *guid)
|
||||
{
|
||||
struct reader *rd;
|
||||
assert (!is_writer_entityid (guid->entityid));
|
||||
|
@ -3960,7 +3960,7 @@ static void proxy_participant_remove_pwr_lease_locked (struct proxy_participant
|
|||
}
|
||||
}
|
||||
|
||||
void new_proxy_participant (struct q_globals *gv, const struct ddsi_guid *ppguid, uint32_t bes, const struct ddsi_guid *privileged_pp_guid, struct addrset *as_default, struct addrset *as_meta, const nn_plist_t *plist, dds_duration_t tlease_dur, nn_vendorid_t vendor, unsigned custom_flags, nn_wctime_t timestamp, seqno_t seq)
|
||||
void new_proxy_participant (struct ddsi_domaingv *gv, const struct ddsi_guid *ppguid, uint32_t bes, const struct ddsi_guid *privileged_pp_guid, struct addrset *as_default, struct addrset *as_meta, const nn_plist_t *plist, dds_duration_t tlease_dur, nn_vendorid_t vendor, unsigned custom_flags, nn_wctime_t timestamp, seqno_t seq)
|
||||
{
|
||||
/* No locking => iff all participants use unique guids, and sedp
|
||||
runs on a single thread, it can't go wrong. FIXME, maybe? The
|
||||
|
@ -4151,7 +4151,7 @@ int update_proxy_participant_plist_locked (struct proxy_participant *proxypp, se
|
|||
{
|
||||
proxypp->seq = seq;
|
||||
|
||||
struct q_globals * const gv = proxypp->e.gv;
|
||||
struct ddsi_domaingv * const gv = proxypp->e.gv;
|
||||
const uint64_t pmask = PP_ENTITY_NAME;
|
||||
const uint64_t qmask = QP_USER_DATA;
|
||||
nn_plist_t *new_plist = ddsrt_malloc (sizeof (*new_plist));
|
||||
|
@ -4367,7 +4367,7 @@ static void purge_helper (const nn_locator_t *n, void * varg)
|
|||
delete_proxy_participant_by_guid (data->proxypp->e.gv, &data->proxypp->e.guid, data->timestamp, 1);
|
||||
}
|
||||
|
||||
void purge_proxy_participants (struct q_globals *gv, const nn_locator_t *loc, bool delete_from_as_disc)
|
||||
void purge_proxy_participants (struct ddsi_domaingv *gv, const nn_locator_t *loc, bool delete_from_as_disc)
|
||||
{
|
||||
/* FIXME: check whether addr:port can't be reused for a new connection by the time we get here. */
|
||||
/* NOTE: This function exists for the sole purpose of cleaning up after closing a TCP connection in ddsi_tcp_close_conn and the state of the calling thread could be anything at this point. Because of that we do the unspeakable and toggle the thread state conditionally. We can't afford to have it in "asleep", as that causes a race with the garbage collector. */
|
||||
|
@ -4390,7 +4390,7 @@ void purge_proxy_participants (struct q_globals *gv, const nn_locator_t *loc, bo
|
|||
thread_state_asleep (ts1);
|
||||
}
|
||||
|
||||
int delete_proxy_participant_by_guid (struct q_globals *gv, const struct ddsi_guid *guid, nn_wctime_t timestamp, int isimplicit)
|
||||
int delete_proxy_participant_by_guid (struct ddsi_domaingv *gv, const struct ddsi_guid *guid, nn_wctime_t timestamp, int isimplicit)
|
||||
{
|
||||
struct proxy_participant *ppt;
|
||||
|
||||
|
@ -4413,7 +4413,7 @@ int delete_proxy_participant_by_guid (struct q_globals *gv, const struct ddsi_gu
|
|||
return 0;
|
||||
}
|
||||
|
||||
uint64_t get_entity_instance_id (const struct q_globals *gv, const struct ddsi_guid *guid)
|
||||
uint64_t get_entity_instance_id (const struct ddsi_domaingv *gv, const struct ddsi_guid *guid)
|
||||
{
|
||||
struct thread_state1 *ts1 = lookup_thread_state ();
|
||||
struct entity_common *e;
|
||||
|
@ -4472,7 +4472,7 @@ static void proxy_endpoint_common_fini (struct entity_common *e, struct proxy_en
|
|||
|
||||
/* PROXY-WRITER ----------------------------------------------------- */
|
||||
|
||||
int new_proxy_writer (struct q_globals *gv, const struct ddsi_guid *ppguid, const struct ddsi_guid *guid, struct addrset *as, const nn_plist_t *plist, struct nn_dqueue *dqueue, struct xeventq *evq, nn_wctime_t timestamp, seqno_t seq)
|
||||
int new_proxy_writer (struct ddsi_domaingv *gv, const struct ddsi_guid *ppguid, const struct ddsi_guid *guid, struct addrset *as, const nn_plist_t *plist, struct nn_dqueue *dqueue, struct xeventq *evq, nn_wctime_t timestamp, seqno_t seq)
|
||||
{
|
||||
struct proxy_participant *proxypp;
|
||||
struct proxy_writer *pwr;
|
||||
|
@ -4698,7 +4698,7 @@ static void gc_delete_proxy_writer (struct gcreq *gcreq)
|
|||
|
||||
/* First stage in deleting the proxy writer. In this function the pwr and its member pointers
|
||||
will remain valid. The real cleaning-up is done async in gc_delete_proxy_writer. */
|
||||
int delete_proxy_writer (struct q_globals *gv, const struct ddsi_guid *guid, nn_wctime_t timestamp, int isimplicit)
|
||||
int delete_proxy_writer (struct ddsi_domaingv *gv, const struct ddsi_guid *guid, nn_wctime_t timestamp, int isimplicit)
|
||||
{
|
||||
struct proxy_writer *pwr;
|
||||
DDSRT_UNUSED_ARG (isimplicit);
|
||||
|
@ -4806,7 +4806,7 @@ int proxy_writer_set_notalive (struct proxy_writer *pwr, bool notify)
|
|||
|
||||
/* PROXY-READER ----------------------------------------------------- */
|
||||
|
||||
int new_proxy_reader (struct q_globals *gv, const struct ddsi_guid *ppguid, const struct ddsi_guid *guid, struct addrset *as, const nn_plist_t *plist, nn_wctime_t timestamp, seqno_t seq
|
||||
int new_proxy_reader (struct ddsi_domaingv *gv, const struct ddsi_guid *ppguid, const struct ddsi_guid *guid, struct addrset *as, const nn_plist_t *plist, nn_wctime_t timestamp, seqno_t seq
|
||||
#ifdef DDSI_INCLUDE_SSM
|
||||
, int favours_ssm
|
||||
#endif
|
||||
|
@ -4917,7 +4917,7 @@ static void gc_delete_proxy_reader (struct gcreq *gcreq)
|
|||
ddsrt_free (prd);
|
||||
}
|
||||
|
||||
int delete_proxy_reader (struct q_globals *gv, const struct ddsi_guid *guid, nn_wctime_t timestamp, int isimplicit)
|
||||
int delete_proxy_reader (struct ddsi_domaingv *gv, const struct ddsi_guid *guid, nn_wctime_t timestamp, int isimplicit)
|
||||
{
|
||||
struct proxy_reader *prd;
|
||||
(void)isimplicit;
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "dds/ddsi/ddsi_entity_index.h"
|
||||
#include "dds/ddsi/q_unused.h"
|
||||
#include "dds/ddsi/q_lease.h"
|
||||
#include "dds/ddsi/q_globals.h" /* for mattr, cattr */
|
||||
#include "dds/ddsi/ddsi_domaingv.h" /* for mattr, cattr */
|
||||
#include "dds/ddsi/q_receive.h" /* for trigger_receive_threads */
|
||||
|
||||
struct gcreq_queue {
|
||||
|
@ -34,11 +34,11 @@ struct gcreq_queue {
|
|||
ddsrt_cond_t cond;
|
||||
int terminate;
|
||||
int32_t count;
|
||||
struct q_globals *gv;
|
||||
struct ddsi_domaingv *gv;
|
||||
struct thread_state1 *ts;
|
||||
};
|
||||
|
||||
static void threads_vtime_gather_for_wait (const struct q_globals *gv, unsigned *nivs, struct idx_vtime *ivs)
|
||||
static void threads_vtime_gather_for_wait (const struct ddsi_domaingv *gv, unsigned *nivs, struct idx_vtime *ivs)
|
||||
{
|
||||
/* copy vtimes of threads, skipping those that are sleeping */
|
||||
uint32_t i, j;
|
||||
|
@ -189,7 +189,7 @@ static uint32_t gcreq_queue_thread (struct gcreq_queue *q)
|
|||
return 0;
|
||||
}
|
||||
|
||||
struct gcreq_queue *gcreq_queue_new (struct q_globals *gv)
|
||||
struct gcreq_queue *gcreq_queue_new (struct ddsi_domaingv *gv)
|
||||
{
|
||||
struct gcreq_queue *q = ddsrt_malloc (sizeof (*q));
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
#include "dds/ddsi/q_gc.h"
|
||||
#include "dds/ddsi/q_entity.h"
|
||||
#include "dds/ddsi/q_nwif.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsi/q_xmsg.h"
|
||||
#include "dds/ddsi/q_receive.h"
|
||||
#include "dds/ddsi/q_pcap.h"
|
||||
|
@ -62,7 +62,7 @@
|
|||
#include "dds__whc.h"
|
||||
#include "dds/ddsi/ddsi_iid.h"
|
||||
|
||||
static void add_peer_addresses (const struct q_globals *gv, struct addrset *as, const struct config_peer_listelem *list)
|
||||
static void add_peer_addresses (const struct ddsi_domaingv *gv, struct addrset *as, const struct config_peer_listelem *list)
|
||||
{
|
||||
while (list)
|
||||
{
|
||||
|
@ -77,7 +77,7 @@ enum make_uc_sockets_ret {
|
|||
MUSRET_NOSOCKET
|
||||
};
|
||||
|
||||
static enum make_uc_sockets_ret make_uc_sockets (struct q_globals *gv, uint32_t * pdisc, uint32_t * pdata, int ppid)
|
||||
static enum make_uc_sockets_ret make_uc_sockets (struct ddsi_domaingv *gv, uint32_t * pdisc, uint32_t * pdata, int ppid)
|
||||
{
|
||||
if (gv->config.many_sockets_mode == MSM_NO_UNICAST)
|
||||
{
|
||||
|
@ -133,7 +133,7 @@ static void make_builtin_endpoint_xqos (dds_qos_t *q, const dds_qos_t *template)
|
|||
q->durability.kind = DDS_DURABILITY_TRANSIENT_LOCAL;
|
||||
}
|
||||
|
||||
static int set_recvips (struct q_globals *gv)
|
||||
static int set_recvips (struct ddsi_domaingv *gv)
|
||||
{
|
||||
gv->recvips = NULL;
|
||||
|
||||
|
@ -238,7 +238,7 @@ static int set_recvips (struct q_globals *gv)
|
|||
* return -1 : ddsi is unicast, but 'mc' indicates it expects multicast
|
||||
* return 0 : ddsi is multicast, but 'mc' indicates it expects unicast
|
||||
* The return 0 means that the possible changes in 'loc' can be ignored. */
|
||||
static int string_to_default_locator (const struct q_globals *gv, nn_locator_t *loc, const char *string, uint32_t port, int mc, const char *tag)
|
||||
static int string_to_default_locator (const struct ddsi_domaingv *gv, nn_locator_t *loc, const char *string, uint32_t port, int mc, const char *tag)
|
||||
{
|
||||
if (strspn (string, " \t") == strlen (string))
|
||||
{
|
||||
|
@ -277,7 +277,7 @@ static int string_to_default_locator (const struct q_globals *gv, nn_locator_t *
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int set_spdp_address (struct q_globals *gv)
|
||||
static int set_spdp_address (struct ddsi_domaingv *gv)
|
||||
{
|
||||
const uint32_t port = ddsi_get_port (&gv->config, DDSI_PORT_MULTI_DISC, 0);
|
||||
int rc = 0;
|
||||
|
@ -310,7 +310,7 @@ static int set_spdp_address (struct q_globals *gv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int set_default_mc_address (struct q_globals *gv)
|
||||
static int set_default_mc_address (struct ddsi_domaingv *gv)
|
||||
{
|
||||
const uint32_t port = ddsi_get_port (&gv->config, DDSI_PORT_MULTI_DATA, 0);
|
||||
int rc;
|
||||
|
@ -324,7 +324,7 @@ static int set_default_mc_address (struct q_globals *gv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int set_ext_address_and_mask (struct q_globals *gv)
|
||||
static int set_ext_address_and_mask (struct ddsi_domaingv *gv)
|
||||
{
|
||||
nn_locator_t loc;
|
||||
int rc;
|
||||
|
@ -361,7 +361,7 @@ static int set_ext_address_and_mask (struct q_globals *gv)
|
|||
}
|
||||
|
||||
#ifdef DDSI_INCLUDE_NETWORK_CHANNELS
|
||||
static int known_channel_p (const struct q_globals *gv, const char *name)
|
||||
static int known_channel_p (const struct ddsi_domaingv *gv, const char *name)
|
||||
{
|
||||
const struct config_channel_listelem *c;
|
||||
for (c = gv->config.channels; c; c = c->next)
|
||||
|
@ -371,7 +371,7 @@ static int known_channel_p (const struct q_globals *gv, const char *name)
|
|||
}
|
||||
#endif
|
||||
|
||||
static int check_thread_properties (const struct q_globals *gv)
|
||||
static int check_thread_properties (const struct ddsi_domaingv *gv)
|
||||
{
|
||||
#ifdef DDSI_INCLUDE_NETWORK_CHANNELS
|
||||
static const char *fixed[] = { "recv", "tev", "gc", "lease", "dq.builtins", "debmon", NULL };
|
||||
|
@ -411,7 +411,7 @@ static int check_thread_properties (const struct q_globals *gv)
|
|||
return ok;
|
||||
}
|
||||
|
||||
int rtps_config_open_trace (struct q_globals *gv)
|
||||
int rtps_config_open_trace (struct ddsi_domaingv *gv)
|
||||
{
|
||||
DDSRT_WARNING_MSVC_OFF(4996);
|
||||
int status;
|
||||
|
@ -447,7 +447,7 @@ int rtps_config_open_trace (struct q_globals *gv)
|
|||
DDSRT_WARNING_MSVC_ON(4996);
|
||||
}
|
||||
|
||||
int rtps_config_prep (struct q_globals *gv, struct cfgst *cfgst)
|
||||
int rtps_config_prep (struct ddsi_domaingv *gv, struct cfgst *cfgst)
|
||||
{
|
||||
#ifdef DDSI_INCLUDE_NETWORK_CHANNELS
|
||||
unsigned num_channels = 0;
|
||||
|
@ -613,7 +613,7 @@ err_config_late_error:
|
|||
}
|
||||
|
||||
struct joinleave_spdp_defmcip_helper_arg {
|
||||
struct q_globals *gv;
|
||||
struct ddsi_domaingv *gv;
|
||||
int errcount;
|
||||
int dojoin;
|
||||
};
|
||||
|
@ -639,7 +639,7 @@ static void joinleave_spdp_defmcip_helper (const nn_locator_t *loc, void *varg)
|
|||
}
|
||||
}
|
||||
|
||||
int joinleave_spdp_defmcip (struct q_globals *gv, int dojoin)
|
||||
int joinleave_spdp_defmcip (struct ddsi_domaingv *gv, int dojoin)
|
||||
{
|
||||
/* Addrset provides an easy way to filter out duplicates */
|
||||
struct joinleave_spdp_defmcip_helper_arg arg;
|
||||
|
@ -661,7 +661,7 @@ int joinleave_spdp_defmcip (struct q_globals *gv, int dojoin)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int create_multicast_sockets (struct q_globals *gv)
|
||||
int create_multicast_sockets (struct ddsi_domaingv *gv)
|
||||
{
|
||||
ddsi_tran_qos_t qos = ddsi_tran_create_qos ();
|
||||
ddsi_tran_conn_t disc, data;
|
||||
|
@ -711,7 +711,7 @@ err_disc:
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void rtps_term_prep (struct q_globals *gv)
|
||||
static void rtps_term_prep (struct ddsi_domaingv *gv)
|
||||
{
|
||||
/* Stop all I/O */
|
||||
ddsrt_mutex_lock (&gv->lock);
|
||||
|
@ -726,7 +726,7 @@ static void rtps_term_prep (struct q_globals *gv)
|
|||
}
|
||||
|
||||
struct wait_for_receive_threads_helper_arg {
|
||||
struct q_globals *gv;
|
||||
struct ddsi_domaingv *gv;
|
||||
unsigned count;
|
||||
};
|
||||
|
||||
|
@ -739,7 +739,7 @@ static void wait_for_receive_threads_helper (struct xevent *xev, void *varg, nn_
|
|||
(void) resched_xevent_if_earlier (xev, add_duration_to_mtime (tnow, T_SECOND));
|
||||
}
|
||||
|
||||
static void wait_for_receive_threads (struct q_globals *gv)
|
||||
static void wait_for_receive_threads (struct ddsi_domaingv *gv)
|
||||
{
|
||||
struct xevent *trigev;
|
||||
struct wait_for_receive_threads_helper_arg cbarg;
|
||||
|
@ -786,13 +786,13 @@ static struct ddsi_sertopic *make_special_topic (const char *name, struct serdat
|
|||
return (struct ddsi_sertopic *) st;
|
||||
}
|
||||
|
||||
static void free_special_topics (struct q_globals *gv)
|
||||
static void free_special_topics (struct ddsi_domaingv *gv)
|
||||
{
|
||||
ddsi_sertopic_unref (gv->plist_topic);
|
||||
ddsi_sertopic_unref (gv->rawcdr_topic);
|
||||
}
|
||||
|
||||
static void make_special_topics (struct q_globals *gv)
|
||||
static void make_special_topics (struct ddsi_domaingv *gv)
|
||||
{
|
||||
gv->plist_topic = make_special_topic ("plist", gv->serpool, DDSRT_ENDIAN == DDSRT_LITTLE_ENDIAN ? PL_CDR_LE : PL_CDR_BE, &ddsi_serdata_ops_plist);
|
||||
gv->rawcdr_topic = make_special_topic ("rawcdr", gv->serpool, DDSRT_ENDIAN == DDSRT_LITTLE_ENDIAN ? CDR_LE : CDR_BE, &ddsi_serdata_ops_rawcdr);
|
||||
|
@ -833,7 +833,7 @@ static bool use_multiple_receive_threads (const struct config *cfg)
|
|||
return false;
|
||||
}
|
||||
|
||||
static int setup_and_start_recv_threads (struct q_globals *gv)
|
||||
static int setup_and_start_recv_threads (struct ddsi_domaingv *gv)
|
||||
{
|
||||
const bool multi_recv_thr = use_multiple_receive_threads (&gv->config);
|
||||
|
||||
|
@ -927,7 +927,7 @@ static uint32_t ddsi_sertopic_hash_wrap (const void *tp)
|
|||
return ddsi_sertopic_hash (tp);
|
||||
}
|
||||
|
||||
int rtps_init (struct q_globals *gv)
|
||||
int rtps_init (struct ddsi_domaingv *gv)
|
||||
{
|
||||
uint32_t port_disc_uc = 0;
|
||||
uint32_t port_data_uc = 0;
|
||||
|
@ -1048,7 +1048,6 @@ int rtps_init (struct q_globals *gv)
|
|||
GVLOG (DDS_LC_CONFIG, "ownip: %s\n", ddsi_locator_to_string_no_port (buf, sizeof(buf), &gv->ownloc));
|
||||
GVLOG (DDS_LC_CONFIG, "extip: %s\n", ddsi_locator_to_string_no_port (buf, sizeof(buf), &gv->extloc));
|
||||
GVLOG (DDS_LC_CONFIG, "extmask: %s%s\n", ddsi_locator_to_string_no_port (buf, sizeof(buf), &gv->extmask), gv->m_factory->m_kind != NN_LOCATOR_KIND_UDPv4 ? " (not applicable)" : "");
|
||||
GVLOG (DDS_LC_CONFIG, "networkid: 0x%lx\n", (unsigned long) gv->myNetworkId);
|
||||
GVLOG (DDS_LC_CONFIG, "SPDP MC: %s\n", ddsi_locator_to_string_no_port (buf, sizeof(buf), &gv->loc_spdp_mc));
|
||||
GVLOG (DDS_LC_CONFIG, "default MC: %s\n", ddsi_locator_to_string_no_port (buf, sizeof(buf), &gv->loc_default_mc));
|
||||
#ifdef DDSI_INCLUDE_SSM
|
||||
|
@ -1483,7 +1482,7 @@ static void stop_all_xeventq_upto (struct config_channel_listelem *chptr)
|
|||
}
|
||||
#endif
|
||||
|
||||
int rtps_start (struct q_globals *gv)
|
||||
int rtps_start (struct ddsi_domaingv *gv)
|
||||
{
|
||||
if (xeventq_start (gv->xevents, NULL) < 0)
|
||||
return -1;
|
||||
|
@ -1549,7 +1548,7 @@ static void builtins_dqueue_ready_cb (void *varg)
|
|||
ddsrt_mutex_unlock (&arg->lock);
|
||||
}
|
||||
|
||||
void rtps_stop (struct q_globals *gv)
|
||||
void rtps_stop (struct ddsi_domaingv *gv)
|
||||
{
|
||||
struct thread_state1 * const ts1 = lookup_thread_state ();
|
||||
|
||||
|
@ -1680,7 +1679,7 @@ void rtps_stop (struct q_globals *gv)
|
|||
ddsrt_mutex_destroy (&gv->privileged_pp_lock);
|
||||
}
|
||||
|
||||
void rtps_fini (struct q_globals *gv)
|
||||
void rtps_fini (struct ddsi_domaingv *gv)
|
||||
{
|
||||
/* Shut down the GC system -- no new requests will be added */
|
||||
gcreq_queue_free (gv->gcreq_queue);
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "dds/ddsi/q_radmin.h"
|
||||
#include "dds/ddsi/ddsi_entity_index.h"
|
||||
#include "dds/ddsi/q_entity.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsi/q_xmsg.h"
|
||||
#include "dds/ddsi/q_bswap.h"
|
||||
#include "dds/ddsi/q_transmit.h"
|
||||
|
@ -64,13 +64,13 @@ int compare_lease_tdur (const void *va, const void *vb)
|
|||
return (a->tdur == b->tdur) ? 0 : (a->tdur < b->tdur) ? -1 : 1;
|
||||
}
|
||||
|
||||
void lease_management_init (struct q_globals *gv)
|
||||
void lease_management_init (struct ddsi_domaingv *gv)
|
||||
{
|
||||
ddsrt_mutex_init (&gv->leaseheap_lock);
|
||||
ddsrt_fibheap_init (&lease_fhdef, &gv->leaseheap);
|
||||
}
|
||||
|
||||
void lease_management_term (struct q_globals *gv)
|
||||
void lease_management_term (struct ddsi_domaingv *gv)
|
||||
{
|
||||
assert (ddsrt_fibheap_min (&lease_fhdef, &gv->leaseheap) == NULL);
|
||||
ddsrt_mutex_destroy (&gv->leaseheap_lock);
|
||||
|
@ -105,7 +105,7 @@ struct lease *lease_clone (const struct lease *l)
|
|||
|
||||
void lease_register (struct lease *l) /* FIXME: make lease admin struct */
|
||||
{
|
||||
struct q_globals * const gv = l->entity->gv;
|
||||
struct ddsi_domaingv * const gv = l->entity->gv;
|
||||
GVTRACE ("lease_register(l %p guid "PGUIDFMT")\n", (void *) l, PGUID (l->entity->guid));
|
||||
ddsrt_mutex_lock (&gv->leaseheap_lock);
|
||||
assert (l->tsched.v == TSCHED_NOT_ON_HEAP);
|
||||
|
@ -123,7 +123,7 @@ void lease_register (struct lease *l) /* FIXME: make lease admin struct */
|
|||
|
||||
void lease_unregister (struct lease *l)
|
||||
{
|
||||
struct q_globals * const gv = l->entity->gv;
|
||||
struct ddsi_domaingv * const gv = l->entity->gv;
|
||||
GVTRACE ("lease_unregister(l %p guid "PGUIDFMT")\n", (void *) l, PGUID (l->entity->guid));
|
||||
ddsrt_mutex_lock (&gv->leaseheap_lock);
|
||||
if (l->tsched.v != TSCHED_NOT_ON_HEAP)
|
||||
|
@ -139,14 +139,14 @@ void lease_unregister (struct lease *l)
|
|||
|
||||
void lease_free (struct lease *l)
|
||||
{
|
||||
struct q_globals * const gv = l->entity->gv;
|
||||
struct ddsi_domaingv * const gv = l->entity->gv;
|
||||
GVTRACE ("lease_free(l %p guid "PGUIDFMT")\n", (void *) l, PGUID (l->entity->guid));
|
||||
ddsrt_free (l);
|
||||
}
|
||||
|
||||
static void trace_lease_renew (const struct lease *l, const char *tag, nn_etime_t tend_new)
|
||||
{
|
||||
struct q_globals const * gv = l->entity->gv;
|
||||
struct ddsi_domaingv const * gv = l->entity->gv;
|
||||
if (gv->logconfig.c.mask & DDS_LC_TRACE)
|
||||
{
|
||||
int32_t tsec, tusec;
|
||||
|
@ -181,7 +181,7 @@ void lease_renew (struct lease *l, nn_etime_t tnowE)
|
|||
|
||||
void lease_set_expiry (struct lease *l, nn_etime_t when)
|
||||
{
|
||||
struct q_globals * const gv = l->entity->gv;
|
||||
struct ddsi_domaingv * const gv = l->entity->gv;
|
||||
bool trigger = false;
|
||||
assert (when.v >= 0);
|
||||
ddsrt_mutex_lock (&gv->leaseheap_lock);
|
||||
|
@ -212,7 +212,7 @@ void lease_set_expiry (struct lease *l, nn_etime_t when)
|
|||
force_lease_check (gv->gcreq_queue);
|
||||
}
|
||||
|
||||
int64_t check_and_handle_lease_expiration (struct q_globals *gv, nn_etime_t tnowE)
|
||||
int64_t check_and_handle_lease_expiration (struct ddsi_domaingv *gv, nn_etime_t tnowE)
|
||||
{
|
||||
struct lease *l;
|
||||
int64_t delay;
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "dds/ddsi/q_log.h"
|
||||
#include "dds/ddsi/q_nwif.h"
|
||||
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsi/q_config.h"
|
||||
#include "dds/ddsi/q_unused.h"
|
||||
#include "dds/ddsi/q_misc.h"
|
||||
|
@ -214,7 +214,7 @@ static int set_reuse_options (const struct ddsrt_log_cfg *logcfg, ddsrt_socket_t
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int bind_socket (ddsrt_socket_t socket, unsigned short port, const struct q_globals *gv)
|
||||
static int bind_socket (ddsrt_socket_t socket, unsigned short port, const struct ddsi_domaingv *gv)
|
||||
{
|
||||
dds_return_t rc = DDS_RETCODE_ERROR;
|
||||
|
||||
|
@ -249,7 +249,7 @@ static int bind_socket (ddsrt_socket_t socket, unsigned short port, const struct
|
|||
}
|
||||
|
||||
#if DDSRT_HAVE_IPV6
|
||||
static int set_mc_options_transmit_ipv6 (ddsrt_socket_t socket, const struct q_globals *gv)
|
||||
static int set_mc_options_transmit_ipv6 (ddsrt_socket_t socket, const struct ddsi_domaingv *gv)
|
||||
{
|
||||
unsigned interfaceNo = gv->interfaceNo;
|
||||
unsigned ttl = (unsigned) gv->config.multicast_ttl;
|
||||
|
@ -274,7 +274,7 @@ static int set_mc_options_transmit_ipv6 (ddsrt_socket_t socket, const struct q_g
|
|||
}
|
||||
#endif
|
||||
|
||||
static int set_mc_options_transmit_ipv4 (ddsrt_socket_t socket, const struct q_globals *gv)
|
||||
static int set_mc_options_transmit_ipv4 (ddsrt_socket_t socket, const struct ddsi_domaingv *gv)
|
||||
{
|
||||
unsigned char ttl = (unsigned char) gv->config.multicast_ttl;
|
||||
unsigned char loop;
|
||||
|
@ -319,7 +319,7 @@ static int set_mc_options_transmit_ipv4 (ddsrt_socket_t socket, const struct q_g
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int set_mc_options_transmit (ddsrt_socket_t socket, const struct q_globals *gv)
|
||||
static int set_mc_options_transmit (ddsrt_socket_t socket, const struct ddsi_domaingv *gv)
|
||||
{
|
||||
#if DDSRT_HAVE_IPV6
|
||||
if (gv->config.transport_selector == TRANS_TCP6 || gv->config.transport_selector == TRANS_UDP6)
|
||||
|
@ -338,7 +338,7 @@ static int set_mc_options_transmit (ddsrt_socket_t socket, const struct q_global
|
|||
}
|
||||
}
|
||||
|
||||
int make_socket (ddsrt_socket_t *sock, uint16_t port, bool stream, bool reuse, const struct q_globals *gv)
|
||||
int make_socket (ddsrt_socket_t *sock, uint16_t port, bool stream, bool reuse, const struct ddsi_domaingv *gv)
|
||||
{
|
||||
/* FIXME: this stuff has to move to the transports */
|
||||
int rc = -2;
|
||||
|
@ -433,7 +433,7 @@ static int multicast_override(const char *ifname, const struct config *config)
|
|||
#include <linux/if_packet.h>
|
||||
#endif
|
||||
|
||||
int find_own_ip (struct q_globals *gv, const char *requested_address)
|
||||
int find_own_ip (struct ddsi_domaingv *gv, const char *requested_address)
|
||||
{
|
||||
const char *sep = " ";
|
||||
char last_if_name[80] = "";
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "dds/ddsi/q_log.h"
|
||||
#include "dds/ddsi/q_time.h"
|
||||
#include "dds/ddsi/q_config.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsi/q_bswap.h"
|
||||
#include "dds/ddsi/q_pcap.h"
|
||||
|
||||
|
@ -127,7 +127,7 @@ static uint16_t calc_ipv4_checksum (const uint16_t *x)
|
|||
return (uint16_t) ~s;
|
||||
}
|
||||
|
||||
void write_pcap_received (struct q_globals *gv, nn_wctime_t tstamp, const struct sockaddr_storage *src, const struct sockaddr_storage *dst, unsigned char *buf, size_t sz)
|
||||
void write_pcap_received (struct ddsi_domaingv *gv, nn_wctime_t tstamp, const struct sockaddr_storage *src, const struct sockaddr_storage *dst, unsigned char *buf, size_t sz)
|
||||
{
|
||||
if (gv->config.transport_selector == TRANS_UDP)
|
||||
{
|
||||
|
@ -160,7 +160,7 @@ void write_pcap_received (struct q_globals *gv, nn_wctime_t tstamp, const struct
|
|||
}
|
||||
}
|
||||
|
||||
void write_pcap_sent (struct q_globals *gv, nn_wctime_t tstamp, const struct sockaddr_storage *src, const ddsrt_msghdr_t *hdr, size_t sz)
|
||||
void write_pcap_sent (struct ddsi_domaingv *gv, nn_wctime_t tstamp, const struct sockaddr_storage *src, const ddsrt_msghdr_t *hdr, size_t sz)
|
||||
{
|
||||
if (gv->config.transport_selector == TRANS_UDP)
|
||||
{
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "dds/ddsi/ddsi_udp.h" /* nn_mc4gen_address_t */
|
||||
|
||||
#include "dds/ddsi/q_config.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsi/q_protocol.h" /* for NN_STATUSINFO_... */
|
||||
#include "dds/ddsi/q_radmin.h" /* for nn_plist_quickscan */
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include "dds/ddsi/q_radmin.h"
|
||||
#include "dds/ddsi/q_bitset.h"
|
||||
#include "dds/ddsi/q_thread.h"
|
||||
#include "dds/ddsi/q_globals.h" /* for mattr, cattr */
|
||||
#include "dds/ddsi/ddsi_domaingv.h" /* for mattr, cattr */
|
||||
|
||||
/* OVERVIEW ------------------------------------------------------------
|
||||
|
||||
|
@ -2426,7 +2426,7 @@ static enum dqueue_elem_kind dqueue_elem_kind (const struct nn_rsample_chain_ele
|
|||
static uint32_t dqueue_thread (struct nn_dqueue *q)
|
||||
{
|
||||
struct thread_state1 * const ts1 = lookup_thread_state ();
|
||||
struct q_globals const * const gv = ddsrt_atomic_ldvoidp (&ts1->gv);
|
||||
struct ddsi_domaingv const * const gv = ddsrt_atomic_ldvoidp (&ts1->gv);
|
||||
nn_mtime_t next_thread_cputime = { 0 };
|
||||
int keepgoing = 1;
|
||||
ddsi_guid_t rdguid, *prdguid = NULL;
|
||||
|
@ -2513,7 +2513,7 @@ static uint32_t dqueue_thread (struct nn_dqueue *q)
|
|||
return 0;
|
||||
}
|
||||
|
||||
struct nn_dqueue *nn_dqueue_new (const char *name, const struct q_globals *gv, uint32_t max_samples, nn_dqueue_handler_t handler, void *arg)
|
||||
struct nn_dqueue *nn_dqueue_new (const char *name, const struct ddsi_domaingv *gv, uint32_t max_samples, nn_dqueue_handler_t handler, void *arg)
|
||||
{
|
||||
struct nn_dqueue *q;
|
||||
char *thrname;
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
#include "dds/ddsi/ddsi_deliver_locally.h"
|
||||
|
||||
#include "dds/ddsi/q_transmit.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsi/q_init.h"
|
||||
#include "dds/ddsi/ddsi_tkmap.h"
|
||||
#include "dds/ddsi/ddsi_mcgroup.h"
|
||||
|
@ -1743,7 +1743,7 @@ struct remote_sourceinfo {
|
|||
nn_wctime_t tstamp;
|
||||
};
|
||||
|
||||
static struct ddsi_serdata *remote_make_sample (struct ddsi_tkmap_instance **tk, struct q_globals *gv, struct ddsi_sertopic const * const topic, void *vsourceinfo)
|
||||
static struct ddsi_serdata *remote_make_sample (struct ddsi_tkmap_instance **tk, struct ddsi_domaingv *gv, struct ddsi_sertopic const * const topic, void *vsourceinfo)
|
||||
{
|
||||
/* hopefully the compiler figures out that these are just aliases and doesn't reload them
|
||||
unnecessarily from memory */
|
||||
|
@ -1917,7 +1917,7 @@ static int deliver_user_data (const struct nn_rsample_info *sampleinfo, const st
|
|||
.on_failure_fastpath = remote_on_delivery_failure_fastpath
|
||||
};
|
||||
struct receiver_state const * const rst = sampleinfo->rst;
|
||||
struct q_globals * const gv = rst->gv;
|
||||
struct ddsi_domaingv * const gv = rst->gv;
|
||||
struct proxy_writer * const pwr = sampleinfo->pwr;
|
||||
unsigned statusinfo;
|
||||
Data_DataFrag_common_t *msg;
|
||||
|
@ -2257,7 +2257,7 @@ static void handle_regular (struct receiver_state *rst, nn_etime_t tnow, struct
|
|||
|
||||
static int handle_SPDP (const struct nn_rsample_info *sampleinfo, struct nn_rdata *rdata)
|
||||
{
|
||||
struct q_globals * const gv = sampleinfo->rst->gv;
|
||||
struct ddsi_domaingv * const gv = sampleinfo->rst->gv;
|
||||
struct nn_rsample *rsample;
|
||||
struct nn_rsample_chain sc;
|
||||
struct nn_rdata *fragchain;
|
||||
|
@ -2452,7 +2452,7 @@ static int handle_DataFrag (struct receiver_state *rst, nn_etime_t tnow, struct
|
|||
return 1;
|
||||
}
|
||||
|
||||
static void malformed_packet_received_nosubmsg (const struct q_globals *gv, const unsigned char * msg, ssize_t len, const char *state, nn_vendorid_t vendorid
|
||||
static void malformed_packet_received_nosubmsg (const struct ddsi_domaingv *gv, const unsigned char * msg, ssize_t len, const char *state, nn_vendorid_t vendorid
|
||||
)
|
||||
{
|
||||
char tmp[1024];
|
||||
|
@ -2469,7 +2469,7 @@ static void malformed_packet_received_nosubmsg (const struct q_globals *gv, cons
|
|||
GVWARNING ("%s\n", tmp);
|
||||
}
|
||||
|
||||
static void malformed_packet_received (const struct q_globals *gv, const unsigned char *msg, const unsigned char *submsg, size_t len, const char *state, SubmessageKind_t smkind, nn_vendorid_t vendorid)
|
||||
static void malformed_packet_received (const struct ddsi_domaingv *gv, const unsigned char *msg, const unsigned char *submsg, size_t len, const char *state, SubmessageKind_t smkind, nn_vendorid_t vendorid)
|
||||
{
|
||||
char tmp[1024];
|
||||
size_t i, pos, smsize;
|
||||
|
@ -2584,7 +2584,7 @@ static struct receiver_state *rst_cow_if_needed (int *rst_live, struct nn_rmsg *
|
|||
static int handle_submsg_sequence
|
||||
(
|
||||
struct thread_state1 * const ts1,
|
||||
struct q_globals *gv,
|
||||
struct ddsi_domaingv *gv,
|
||||
ddsi_tran_conn_t conn,
|
||||
const nn_locator_t *srcloc,
|
||||
nn_wctime_t tnowWC,
|
||||
|
@ -2864,7 +2864,7 @@ malformed_asleep:
|
|||
return -1;
|
||||
}
|
||||
|
||||
static bool do_packet (struct thread_state1 * const ts1, struct q_globals *gv, ddsi_tran_conn_t conn, const ddsi_guid_prefix_t *guidprefix, struct nn_rbufpool *rbpool)
|
||||
static bool do_packet (struct thread_state1 * const ts1, struct ddsi_domaingv *gv, ddsi_tran_conn_t conn, const ddsi_guid_prefix_t *guidprefix, struct nn_rbufpool *rbpool)
|
||||
{
|
||||
/* UDP max packet size is 64kB */
|
||||
|
||||
|
@ -3041,7 +3041,7 @@ static void local_participant_set_fini (struct local_participant_set *lps)
|
|||
ddsrt_free (lps->ps);
|
||||
}
|
||||
|
||||
static void rebuild_local_participant_set (struct thread_state1 * const ts1, struct q_globals *gv, struct local_participant_set *lps)
|
||||
static void rebuild_local_participant_set (struct thread_state1 * const ts1, struct ddsi_domaingv *gv, struct local_participant_set *lps)
|
||||
{
|
||||
struct entidx_enum_participant est;
|
||||
struct participant *pp;
|
||||
|
@ -3109,7 +3109,7 @@ static void rebuild_local_participant_set (struct thread_state1 * const ts1, str
|
|||
|
||||
uint32_t listen_thread (struct ddsi_tran_listener *listener)
|
||||
{
|
||||
struct q_globals *gv = listener->m_base.gv;
|
||||
struct ddsi_domaingv *gv = listener->m_base.gv;
|
||||
ddsi_tran_conn_t conn;
|
||||
|
||||
while (ddsrt_atomic_ld32 (&gv->rtps_keepgoing))
|
||||
|
@ -3132,7 +3132,7 @@ static int recv_thread_waitset_add_conn (os_sockWaitset ws, ddsi_tran_conn_t con
|
|||
return 0;
|
||||
else
|
||||
{
|
||||
struct q_globals *gv = conn->m_base.gv;
|
||||
struct ddsi_domaingv *gv = conn->m_base.gv;
|
||||
for (uint32_t i = 0; i < gv->n_recv_threads; i++)
|
||||
if (gv->recv_threads[i].arg.mode == RTM_SINGLE && gv->recv_threads[i].arg.u.single.conn == conn)
|
||||
return 0;
|
||||
|
@ -3151,7 +3151,7 @@ struct local_deaf_state {
|
|||
nn_mtime_t tnext;
|
||||
};
|
||||
|
||||
static int check_and_handle_deafness_recover (struct q_globals *gv, struct local_deaf_state *st, unsigned num_fixed_uc)
|
||||
static int check_and_handle_deafness_recover (struct ddsi_domaingv *gv, struct local_deaf_state *st, unsigned num_fixed_uc)
|
||||
{
|
||||
int rebuildws = 0;
|
||||
if (now_mt().v < st->tnext.v)
|
||||
|
@ -3206,7 +3206,7 @@ error:
|
|||
return rebuildws;
|
||||
}
|
||||
|
||||
static int check_and_handle_deafness (struct q_globals *gv, struct local_deaf_state *st, unsigned num_fixed_uc)
|
||||
static int check_and_handle_deafness (struct ddsi_domaingv *gv, struct local_deaf_state *st, unsigned num_fixed_uc)
|
||||
{
|
||||
const int gv_deaf = gv->deaf;
|
||||
assert (gv_deaf == 0 || gv_deaf == 1);
|
||||
|
@ -3231,7 +3231,7 @@ static int check_and_handle_deafness (struct q_globals *gv, struct local_deaf_st
|
|||
}
|
||||
}
|
||||
|
||||
void trigger_recv_threads (const struct q_globals *gv)
|
||||
void trigger_recv_threads (const struct ddsi_domaingv *gv)
|
||||
{
|
||||
for (uint32_t i = 0; i < gv->n_recv_threads; i++)
|
||||
{
|
||||
|
@ -3263,7 +3263,7 @@ uint32_t recv_thread (void *vrecv_thread_arg)
|
|||
{
|
||||
struct thread_state1 * const ts1 = lookup_thread_state ();
|
||||
struct recv_thread_arg *recv_thread_arg = vrecv_thread_arg;
|
||||
struct q_globals * const gv = recv_thread_arg->gv;
|
||||
struct ddsi_domaingv * const gv = recv_thread_arg->gv;
|
||||
struct nn_rbufpool *rbpool = recv_thread_arg->rbpool;
|
||||
os_sockWaitset waitset = recv_thread_arg->mode == RTM_MANY ? recv_thread_arg->u.many.ws : NULL;
|
||||
nn_mtime_t next_thread_cputime = { 0 };
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "dds/ddsi/ddsi_threadmon.h"
|
||||
#include "dds/ddsi/q_log.h"
|
||||
#include "dds/ddsi/q_config.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsi/sysdeps.h"
|
||||
|
||||
struct thread_states thread_states;
|
||||
|
@ -39,12 +39,12 @@ extern inline struct thread_state1 *lookup_thread_state (void);
|
|||
extern inline bool thread_is_asleep (void);
|
||||
extern inline bool thread_is_awake (void);
|
||||
extern inline void thread_state_asleep (struct thread_state1 *ts1);
|
||||
extern inline void thread_state_awake (struct thread_state1 *ts1, const struct q_globals *gv);
|
||||
extern inline void thread_state_awake (struct thread_state1 *ts1, const struct ddsi_domaingv *gv);
|
||||
extern inline void thread_state_awake_domain_ok (struct thread_state1 *ts1);
|
||||
extern inline void thread_state_awake_fixed_domain (struct thread_state1 *ts1);
|
||||
extern inline void thread_state_awake_to_awake_no_nest (struct thread_state1 *ts1);
|
||||
|
||||
static struct thread_state1 *init_thread_state (const char *tname, const struct q_globals *gv, enum thread_state state);
|
||||
static struct thread_state1 *init_thread_state (const char *tname, const struct ddsi_domaingv *gv, enum thread_state state);
|
||||
static void reap_thread_state (struct thread_state1 *ts1);
|
||||
|
||||
static void *ddsrt_malloc_aligned_cacheline (size_t size)
|
||||
|
@ -213,7 +213,7 @@ static uint32_t create_thread_wrapper (void *ptr)
|
|||
{
|
||||
uint32_t ret;
|
||||
struct thread_context *ctx = ptr;
|
||||
struct q_globals const * const gv = ddsrt_atomic_ldvoidp (&ctx->self->gv);
|
||||
struct ddsi_domaingv const * const gv = ddsrt_atomic_ldvoidp (&ctx->self->gv);
|
||||
if (gv)
|
||||
GVTRACE ("started new thread %"PRIdTID": %s\n", ddsrt_gettid (), ctx->self->name);
|
||||
ctx->self->tid = ddsrt_thread_self ();
|
||||
|
@ -240,7 +240,7 @@ const struct config_thread_properties_listelem *lookup_thread_properties (const
|
|||
return e;
|
||||
}
|
||||
|
||||
static struct thread_state1 *init_thread_state (const char *tname, const struct q_globals *gv, enum thread_state state)
|
||||
static struct thread_state1 *init_thread_state (const char *tname, const struct ddsi_domaingv *gv, enum thread_state state)
|
||||
{
|
||||
int cand;
|
||||
struct thread_state1 *ts;
|
||||
|
@ -249,7 +249,7 @@ static struct thread_state1 *init_thread_state (const char *tname, const struct
|
|||
return NULL;
|
||||
|
||||
ts = &thread_states.ts[cand];
|
||||
ddsrt_atomic_stvoidp (&ts->gv, (struct q_globals *) gv);
|
||||
ddsrt_atomic_stvoidp (&ts->gv, (struct ddsi_domaingv *) gv);
|
||||
assert (vtime_asleep_p (ddsrt_atomic_ld32 (&ts->vtime)));
|
||||
(void) ddsrt_strlcpy (ts->name, tname, sizeof (ts->name));
|
||||
ts->state = state;
|
||||
|
@ -257,7 +257,7 @@ static struct thread_state1 *init_thread_state (const char *tname, const struct
|
|||
return ts;
|
||||
}
|
||||
|
||||
static dds_return_t create_thread_int (struct thread_state1 **ts1, const struct q_globals *gv, struct config_thread_properties_listelem const * const tprops, const char *name, uint32_t (*f) (void *arg), void *arg)
|
||||
static dds_return_t create_thread_int (struct thread_state1 **ts1, const struct ddsi_domaingv *gv, struct config_thread_properties_listelem const * const tprops, const char *name, uint32_t (*f) (void *arg), void *arg)
|
||||
{
|
||||
ddsrt_threadattr_t tattr;
|
||||
ddsrt_thread_t tid;
|
||||
|
@ -308,7 +308,7 @@ dds_return_t create_thread_with_properties (struct thread_state1 **ts1, struct c
|
|||
return create_thread_int (ts1, NULL, tprops, name, f, arg);
|
||||
}
|
||||
|
||||
dds_return_t create_thread (struct thread_state1 **ts1, const struct q_globals *gv, const char *name, uint32_t (*f) (void *arg), void *arg)
|
||||
dds_return_t create_thread (struct thread_state1 **ts1, const struct ddsi_domaingv *gv, const char *name, uint32_t (*f) (void *arg), void *arg)
|
||||
{
|
||||
struct config_thread_properties_listelem const * const tprops = lookup_thread_properties (&gv->config, name);
|
||||
return create_thread_int (ts1, gv, tprops, name, f, arg);
|
||||
|
@ -337,7 +337,7 @@ void reset_thread_state (struct thread_state1 *ts1)
|
|||
reap_thread_state (ts1);
|
||||
}
|
||||
|
||||
void log_stack_traces (const struct ddsrt_log_cfg *logcfg, const struct q_globals *gv)
|
||||
void log_stack_traces (const struct ddsrt_log_cfg *logcfg, const struct ddsi_domaingv *gv)
|
||||
{
|
||||
for (uint32_t i = 0; i < thread_states.nthreads; i++)
|
||||
{
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "dds/ddsi/q_xevent.h"
|
||||
#include "dds/ddsi/q_time.h"
|
||||
#include "dds/ddsi/q_config.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsi/q_transmit.h"
|
||||
#include "dds/ddsi/q_entity.h"
|
||||
#include "dds/ddsi/q_unused.h"
|
||||
|
@ -79,7 +79,7 @@ static void writer_hbcontrol_note_hb (struct writer *wr, nn_mtime_t tnow, int an
|
|||
|
||||
int64_t writer_hbcontrol_intv (const struct writer *wr, const struct whc_state *whcst, UNUSED_ARG (nn_mtime_t tnow))
|
||||
{
|
||||
struct q_globals const * const gv = wr->e.gv;
|
||||
struct ddsi_domaingv const * const gv = wr->e.gv;
|
||||
struct hbcontrol const * const hbc = &wr->hbcontrol;
|
||||
int64_t ret = gv->config.const_hb_intv_sched;
|
||||
size_t n_unacked;
|
||||
|
@ -105,7 +105,7 @@ int64_t writer_hbcontrol_intv (const struct writer *wr, const struct whc_state *
|
|||
|
||||
void writer_hbcontrol_note_asyncwrite (struct writer *wr, nn_mtime_t tnow)
|
||||
{
|
||||
struct q_globals const * const gv = wr->e.gv;
|
||||
struct ddsi_domaingv const * const gv = wr->e.gv;
|
||||
struct hbcontrol * const hbc = &wr->hbcontrol;
|
||||
nn_mtime_t tnext;
|
||||
|
||||
|
@ -134,7 +134,7 @@ int writer_hbcontrol_must_send (const struct writer *wr, const struct whc_state
|
|||
|
||||
struct nn_xmsg *writer_hbcontrol_create_heartbeat (struct writer *wr, const struct whc_state *whcst, nn_mtime_t tnow, int hbansreq, int issync)
|
||||
{
|
||||
struct q_globals const * const gv = wr->e.gv;
|
||||
struct ddsi_domaingv const * const gv = wr->e.gv;
|
||||
struct nn_xmsg *msg;
|
||||
const ddsi_guid_t *prd_guid;
|
||||
|
||||
|
@ -226,7 +226,7 @@ struct nn_xmsg *writer_hbcontrol_create_heartbeat (struct writer *wr, const stru
|
|||
|
||||
static int writer_hbcontrol_ack_required_generic (const struct writer *wr, const struct whc_state *whcst, nn_mtime_t tlast, nn_mtime_t tnow, int piggyback)
|
||||
{
|
||||
struct q_globals const * const gv = wr->e.gv;
|
||||
struct ddsi_domaingv const * const gv = wr->e.gv;
|
||||
struct hbcontrol const * const hbc = &wr->hbcontrol;
|
||||
const int64_t hb_intv_ack = gv->config.const_hb_intv_sched;
|
||||
assert(wr->heartbeat_xevent != NULL && whcst != NULL);
|
||||
|
@ -317,7 +317,7 @@ struct nn_xmsg *writer_hbcontrol_piggyback (struct writer *wr, const struct whc_
|
|||
|
||||
void add_Heartbeat (struct nn_xmsg *msg, struct writer *wr, const struct whc_state *whcst, int hbansreq, int hbliveliness, ddsi_entityid_t dst, int issync)
|
||||
{
|
||||
struct q_globals const * const gv = wr->e.gv;
|
||||
struct ddsi_domaingv const * const gv = wr->e.gv;
|
||||
struct nn_xmsg_marker sm_marker;
|
||||
Heartbeat_t * hb;
|
||||
seqno_t max = 0, min = 1;
|
||||
|
@ -392,7 +392,7 @@ static dds_return_t create_fragment_message_simple (struct writer *wr, seqno_t s
|
|||
/* actual expected_inline_qos_size is typically 0, but always claiming 32 bytes won't make
|
||||
a difference, so no point in being precise */
|
||||
const size_t expected_inline_qos_size = /* statusinfo */ 8 + /* keyhash */ 20 + /* sentinel */ 4;
|
||||
struct q_globals const * const gv = wr->e.gv;
|
||||
struct ddsi_domaingv const * const gv = wr->e.gv;
|
||||
struct nn_xmsg_marker sm_marker;
|
||||
unsigned char contentflag = 0;
|
||||
Data_t *data;
|
||||
|
@ -477,7 +477,7 @@ dds_return_t create_fragment_message (struct writer *wr, seqno_t seq, const stru
|
|||
actual expected_inline_qos_size is typically 0, but always claiming 32 bytes won't make
|
||||
a difference, so no point in being precise */
|
||||
const size_t expected_inline_qos_size = /* statusinfo */ 8 + /* keyhash */ 20 + /* sentinel */ 4;
|
||||
struct q_globals const * const gv = wr->e.gv;
|
||||
struct ddsi_domaingv const * const gv = wr->e.gv;
|
||||
struct nn_xmsg_marker sm_marker;
|
||||
void *sm;
|
||||
Data_DataFrag_common_t *ddcmn;
|
||||
|
@ -636,7 +636,7 @@ dds_return_t create_fragment_message (struct writer *wr, seqno_t seq, const stru
|
|||
|
||||
static void create_HeartbeatFrag (struct writer *wr, seqno_t seq, unsigned fragnum, struct proxy_reader *prd, struct nn_xmsg **pmsg)
|
||||
{
|
||||
struct q_globals const * const gv = wr->e.gv;
|
||||
struct ddsi_domaingv const * const gv = wr->e.gv;
|
||||
struct nn_xmsg_marker sm_marker;
|
||||
HeartbeatFrag_t *hbf;
|
||||
ASSERT_MUTEX_HELD (&wr->e.lock);
|
||||
|
@ -671,7 +671,7 @@ static void create_HeartbeatFrag (struct writer *wr, seqno_t seq, unsigned fragn
|
|||
nn_xmsg_submsg_setnext (*pmsg, sm_marker);
|
||||
}
|
||||
|
||||
dds_return_t write_hb_liveliness (struct q_globals * const gv, struct ddsi_guid *wr_guid, struct nn_xpack *xp)
|
||||
dds_return_t write_hb_liveliness (struct ddsi_domaingv * const gv, struct ddsi_guid *wr_guid, struct nn_xpack *xp)
|
||||
{
|
||||
struct nn_xmsg *msg = NULL;
|
||||
struct whc_state whcst;
|
||||
|
@ -790,7 +790,7 @@ static void transmit_sample_lgmsg_unlocked (struct nn_xpack *xp, struct writer *
|
|||
static void transmit_sample_unlocks_wr (struct nn_xpack *xp, struct writer *wr, const struct whc_state *whcst, seqno_t seq, const struct nn_plist *plist, struct ddsi_serdata *serdata, struct proxy_reader *prd, int isnew)
|
||||
{
|
||||
/* on entry: &wr->e.lock held; on exit: lock no longer held */
|
||||
struct q_globals const * const gv = wr->e.gv;
|
||||
struct ddsi_domaingv const * const gv = wr->e.gv;
|
||||
struct nn_xmsg *fmsg;
|
||||
uint32_t sz;
|
||||
assert(xp);
|
||||
|
@ -832,7 +832,7 @@ static void transmit_sample_unlocks_wr (struct nn_xpack *xp, struct writer *wr,
|
|||
|
||||
int enqueue_sample_wrlock_held (struct writer *wr, seqno_t seq, const struct nn_plist *plist, struct ddsi_serdata *serdata, struct proxy_reader *prd, int isnew)
|
||||
{
|
||||
struct q_globals const * const gv = wr->e.gv;
|
||||
struct ddsi_domaingv const * const gv = wr->e.gv;
|
||||
uint32_t i, sz, nfrags;
|
||||
int enqueued = 1;
|
||||
|
||||
|
@ -997,7 +997,7 @@ static dds_return_t throttle_writer (struct thread_state1 * const ts1, struct nn
|
|||
resent to them, until a ACKNACK is received from that
|
||||
reader. This implicitly clears the whc and unblocks the
|
||||
writer. */
|
||||
struct q_globals const * const gv = wr->e.gv;
|
||||
struct ddsi_domaingv const * const gv = wr->e.gv;
|
||||
dds_return_t result = DDS_RETCODE_OK;
|
||||
nn_mtime_t tnow = now_mt ();
|
||||
const nn_mtime_t abstimeout = add_duration_to_mtime (tnow, wr->xqos->reliability.max_blocking_time);
|
||||
|
@ -1068,7 +1068,7 @@ static dds_return_t throttle_writer (struct thread_state1 * const ts1, struct nn
|
|||
|
||||
static int maybe_grow_whc (struct writer *wr)
|
||||
{
|
||||
struct q_globals const * const gv = wr->e.gv;
|
||||
struct ddsi_domaingv const * const gv = wr->e.gv;
|
||||
if (!wr->retransmitting && gv->config.whc_adaptive && wr->whc_high < gv->config.whc_highwater_mark)
|
||||
{
|
||||
nn_etime_t tnow = now_et();
|
||||
|
@ -1086,7 +1086,7 @@ static int maybe_grow_whc (struct writer *wr)
|
|||
|
||||
static int write_sample_eot (struct thread_state1 * const ts1, struct nn_xpack *xp, struct writer *wr, struct nn_plist *plist, struct ddsi_serdata *serdata, struct ddsi_tkmap_instance *tk, int end_of_txn, int gc_allowed)
|
||||
{
|
||||
struct q_globals const * const gv = wr->e.gv;
|
||||
struct ddsi_domaingv const * const gv = wr->e.gv;
|
||||
int r;
|
||||
seqno_t seq;
|
||||
nn_mtime_t tnow;
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "dds/ddsi/q_thread.h"
|
||||
#include "dds/ddsi/q_config.h"
|
||||
#include "dds/ddsi/q_unused.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsi/ddsi_entity_index.h"
|
||||
#include "dds/ddsi/q_transmit.h"
|
||||
#include "dds/ddsi/q_bswap.h"
|
||||
|
@ -144,7 +144,7 @@ struct xeventq {
|
|||
size_t max_queued_rexmit_msgs;
|
||||
int terminate;
|
||||
struct thread_state1 *ts;
|
||||
struct q_globals *gv;
|
||||
struct ddsi_domaingv *gv;
|
||||
ddsrt_mutex_t lock;
|
||||
ddsrt_cond_t cond;
|
||||
ddsi_tran_conn_t tev_conn;
|
||||
|
@ -586,7 +586,7 @@ static void handle_xevk_entityid (struct nn_xpack *xp, struct xevent_nt *ev)
|
|||
|
||||
static void handle_xevk_heartbeat (struct nn_xpack *xp, struct xevent *ev, nn_mtime_t tnow /* monotonic */)
|
||||
{
|
||||
struct q_globals const * const gv = ev->evq->gv;
|
||||
struct ddsi_domaingv const * const gv = ev->evq->gv;
|
||||
struct nn_xmsg *msg;
|
||||
struct writer *wr;
|
||||
nn_mtime_t t_next;
|
||||
|
@ -857,7 +857,7 @@ static void handle_xevk_acknack (UNUSED_ARG (struct nn_xpack *xp), struct xevent
|
|||
A little snag is that the defragmenter can throw out partial samples in
|
||||
favour of others, so MUST ensure that the defragmenter won't start
|
||||
threshing and fail to make progress! */
|
||||
struct q_globals *gv = ev->evq->gv;
|
||||
struct ddsi_domaingv *gv = ev->evq->gv;
|
||||
struct proxy_writer *pwr;
|
||||
struct nn_xmsg *msg;
|
||||
struct pwr_rd_match *rwn;
|
||||
|
@ -948,7 +948,7 @@ static bool resend_spdp_sample_by_guid_key (struct writer *wr, const ddsi_guid_t
|
|||
/* Look up data in (transient-local) WHC by key value -- FIXME: clearly
|
||||
a slightly more efficient and elegant way of looking up the key value
|
||||
is to be preferred */
|
||||
struct q_globals *gv = wr->e.gv;
|
||||
struct ddsi_domaingv *gv = wr->e.gv;
|
||||
bool sample_found;
|
||||
nn_plist_t ps;
|
||||
nn_plist_init_empty (&ps);
|
||||
|
@ -984,7 +984,7 @@ static bool resend_spdp_sample_by_guid_key (struct writer *wr, const ddsi_guid_t
|
|||
static void handle_xevk_spdp (UNUSED_ARG (struct nn_xpack *xp), struct xevent *ev, nn_mtime_t tnow)
|
||||
{
|
||||
/* Like the writer pointer in the heartbeat event, the participant pointer in the spdp event is assumed valid. */
|
||||
struct q_globals *gv = ev->evq->gv;
|
||||
struct ddsi_domaingv *gv = ev->evq->gv;
|
||||
struct participant *pp;
|
||||
struct proxy_reader *prd;
|
||||
struct writer *spdp_wr;
|
||||
|
@ -1098,7 +1098,7 @@ static void handle_xevk_spdp (UNUSED_ARG (struct nn_xpack *xp), struct xevent *e
|
|||
|
||||
static void handle_xevk_pmd_update (struct thread_state1 * const ts1, struct nn_xpack *xp, struct xevent *ev, nn_mtime_t tnow)
|
||||
{
|
||||
struct q_globals * const gv = ev->evq->gv;
|
||||
struct ddsi_domaingv * const gv = ev->evq->gv;
|
||||
struct participant *pp;
|
||||
dds_duration_t intv;
|
||||
nn_mtime_t tnext;
|
||||
|
@ -1133,7 +1133,7 @@ static void handle_xevk_pmd_update (struct thread_state1 * const ts1, struct nn_
|
|||
static void handle_xevk_delete_writer (UNUSED_ARG (struct nn_xpack *xp), struct xevent *ev, UNUSED_ARG (nn_mtime_t tnow))
|
||||
{
|
||||
/* don't worry if the writer is already gone by the time we get here. */
|
||||
struct q_globals * const gv = ev->evq->gv;
|
||||
struct ddsi_domaingv * const gv = ev->evq->gv;
|
||||
GVTRACE ("handle_xevk_delete_writer: "PGUIDFMT"\n", PGUID (ev->u.delete_writer.guid));
|
||||
delete_writer_nolinger (gv, &ev->u.delete_writer.guid);
|
||||
delete_xevent (ev);
|
||||
|
@ -1354,7 +1354,7 @@ void qxev_msg (struct xeventq *evq, struct nn_xmsg *msg)
|
|||
|
||||
void qxev_prd_entityid (struct proxy_reader *prd, ddsi_guid_prefix_t *id)
|
||||
{
|
||||
struct q_globals * const gv = prd->e.gv;
|
||||
struct ddsi_domaingv * const gv = prd->e.gv;
|
||||
struct nn_xmsg *msg;
|
||||
struct xevent_nt *ev;
|
||||
|
||||
|
@ -1382,7 +1382,7 @@ void qxev_prd_entityid (struct proxy_reader *prd, ddsi_guid_prefix_t *id)
|
|||
|
||||
void qxev_pwr_entityid (struct proxy_writer *pwr, ddsi_guid_prefix_t *id)
|
||||
{
|
||||
struct q_globals * const gv = pwr->e.gv;
|
||||
struct ddsi_domaingv * const gv = pwr->e.gv;
|
||||
struct nn_xmsg *msg;
|
||||
struct xevent_nt *ev;
|
||||
|
||||
|
@ -1410,7 +1410,7 @@ void qxev_pwr_entityid (struct proxy_writer *pwr, ddsi_guid_prefix_t *id)
|
|||
|
||||
int qxev_msg_rexmit_wrlock_held (struct xeventq *evq, struct nn_xmsg *msg, int force)
|
||||
{
|
||||
struct q_globals * const gv = evq->gv;
|
||||
struct ddsi_domaingv * const gv = evq->gv;
|
||||
size_t msg_size = nn_xmsg_size (msg);
|
||||
struct xevent_nt *ev;
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "dds/ddsi/q_xmsg.h"
|
||||
#include "dds/ddsi/q_config.h"
|
||||
#include "dds/ddsi/q_entity.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsi/ddsi_entity_index.h"
|
||||
#include "dds/ddsi/q_freelist.h"
|
||||
#include "dds/ddsi/ddsi_serdata_default.h"
|
||||
|
@ -202,7 +202,7 @@ struct nn_xpack
|
|||
size_t niov;
|
||||
ddsrt_iovec_t *iov;
|
||||
enum nn_xmsg_dstmode dstmode;
|
||||
struct q_globals *gv;
|
||||
struct ddsi_domaingv *gv;
|
||||
|
||||
union
|
||||
{
|
||||
|
@ -644,7 +644,7 @@ static int readerId_compatible (const struct nn_xmsg *m, const struct nn_xmsg *m
|
|||
return e.u == NN_ENTITYID_UNKNOWN || e.u == eadd.u;
|
||||
}
|
||||
|
||||
int nn_xmsg_merge_rexmit_destinations_wrlock_held (struct q_globals *gv, struct nn_xmsg *m, const struct nn_xmsg *madd)
|
||||
int nn_xmsg_merge_rexmit_destinations_wrlock_held (struct ddsi_domaingv *gv, struct nn_xmsg *m, const struct nn_xmsg *madd)
|
||||
{
|
||||
assert (m->kindspecific.data.wrseq >= 1);
|
||||
assert (m->kindspecific.data.wrguid.prefix.u[0] != 0);
|
||||
|
@ -829,7 +829,7 @@ int nn_xmsg_addpar_sentinel_ifparam (struct nn_xmsg * m)
|
|||
pointer we compute the address of the xmsg from the address of the
|
||||
chain element, &c. */
|
||||
|
||||
static void nn_xmsg_chain_release (struct q_globals *gv, struct nn_xmsg_chain *chain)
|
||||
static void nn_xmsg_chain_release (struct ddsi_domaingv *gv, struct nn_xmsg_chain *chain)
|
||||
{
|
||||
ddsi_guid_t wrguid;
|
||||
memset (&wrguid, 0, sizeof (wrguid));
|
||||
|
@ -887,7 +887,7 @@ static void nn_xmsg_chain_add (struct nn_xmsg_chain *chain, struct nn_xmsg *m)
|
|||
|
||||
#define NN_BW_LIMIT_MAX_BUFFER (-30 * T_MILLISECOND)
|
||||
#define NN_BW_LIMIT_MIN_SLEEP (2 * T_MILLISECOND)
|
||||
static void nn_bw_limit_sleep_if_needed (struct q_globals const * const gv, struct nn_bw_limiter *this, ssize_t size)
|
||||
static void nn_bw_limit_sleep_if_needed (struct ddsi_domaingv const * const gv, struct nn_bw_limiter *this, ssize_t size)
|
||||
{
|
||||
if ( this->bandwidth > 0 ) {
|
||||
nn_mtime_t tnow = now_mt();
|
||||
|
@ -1015,7 +1015,7 @@ void nn_xpack_free (struct nn_xpack *xp)
|
|||
static ssize_t nn_xpack_send1 (const nn_locator_t *loc, void * varg)
|
||||
{
|
||||
struct nn_xpack *xp = varg;
|
||||
struct q_globals const * const gv = xp->gv;
|
||||
struct ddsi_domaingv const * const gv = xp->gv;
|
||||
ssize_t nbytes = 0;
|
||||
|
||||
if (gv->logconfig.c.mask & DDS_LC_TRACE)
|
||||
|
@ -1101,7 +1101,7 @@ static void nn_xpack_send1_threaded (const nn_locator_t *loc, void * varg)
|
|||
|
||||
static void nn_xpack_send_real (struct nn_xpack *xp)
|
||||
{
|
||||
struct q_globals const * const gv = xp->gv;
|
||||
struct ddsi_domaingv const * const gv = xp->gv;
|
||||
size_t calls;
|
||||
|
||||
assert (xp->niov <= NN_XMSG_MAX_MESSAGE_IOVECS);
|
||||
|
@ -1181,7 +1181,7 @@ static void nn_xpack_send_real (struct nn_xpack *xp)
|
|||
|
||||
static uint32_t nn_xpack_sendq_thread (void *vgv)
|
||||
{
|
||||
struct q_globals *gv = vgv;
|
||||
struct ddsi_domaingv *gv = vgv;
|
||||
ddsrt_mutex_lock (&gv->sendq_lock);
|
||||
while (!(gv->sendq_stop && gv->sendq_head == NULL))
|
||||
{
|
||||
|
@ -1205,7 +1205,7 @@ static uint32_t nn_xpack_sendq_thread (void *vgv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void nn_xpack_sendq_init (struct q_globals *gv)
|
||||
void nn_xpack_sendq_init (struct ddsi_domaingv *gv)
|
||||
{
|
||||
gv->sendq_stop = 0;
|
||||
gv->sendq_head = NULL;
|
||||
|
@ -1215,13 +1215,13 @@ void nn_xpack_sendq_init (struct q_globals *gv)
|
|||
ddsrt_cond_init (&gv->sendq_cond);
|
||||
}
|
||||
|
||||
void nn_xpack_sendq_start (struct q_globals *gv)
|
||||
void nn_xpack_sendq_start (struct ddsi_domaingv *gv)
|
||||
{
|
||||
if (create_thread (&gv->sendq_ts, gv, "sendq", nn_xpack_sendq_thread, NULL) != DDS_RETCODE_OK)
|
||||
GVERROR ("nn_xpack_sendq_start: can't create nn_xpack_sendq_thread\n");
|
||||
}
|
||||
|
||||
void nn_xpack_sendq_stop (struct q_globals *gv)
|
||||
void nn_xpack_sendq_stop (struct ddsi_domaingv *gv)
|
||||
{
|
||||
ddsrt_mutex_lock (&gv->sendq_lock);
|
||||
gv->sendq_stop = 1;
|
||||
|
@ -1229,7 +1229,7 @@ void nn_xpack_sendq_stop (struct q_globals *gv)
|
|||
ddsrt_mutex_unlock (&gv->sendq_lock);
|
||||
}
|
||||
|
||||
void nn_xpack_sendq_fini (struct q_globals *gv)
|
||||
void nn_xpack_sendq_fini (struct ddsi_domaingv *gv)
|
||||
{
|
||||
assert (gv->sendq_head == NULL);
|
||||
join_thread (gv->sendq_ts);
|
||||
|
@ -1245,7 +1245,7 @@ void nn_xpack_send (struct nn_xpack *xp, bool immediately)
|
|||
}
|
||||
else
|
||||
{
|
||||
struct q_globals * const gv = xp->gv;
|
||||
struct ddsi_domaingv * const gv = xp->gv;
|
||||
struct nn_xpack *xp1 = ddsrt_malloc (sizeof (*xp));
|
||||
memcpy (xp1, xp, sizeof (*xp1));
|
||||
nn_xpack_reinit (xp);
|
||||
|
@ -1350,7 +1350,7 @@ static int guid_prefix_eq (const ddsi_guid_prefix_t *a, const ddsi_guid_prefix_t
|
|||
int nn_xpack_addmsg (struct nn_xpack *xp, struct nn_xmsg *m, const uint32_t flags)
|
||||
{
|
||||
/* Returns > 0 if pack got sent out before adding m */
|
||||
struct q_globals const * const gv = xp->gv;
|
||||
struct ddsi_domaingv const * const gv = xp->gv;
|
||||
static InfoDST_t static_zero_dst = {
|
||||
{ SMID_INFO_DST, (DDSRT_ENDIAN == DDSRT_LITTLE_ENDIAN ? SMFLAG_ENDIANNESS : 0), sizeof (ddsi_guid_prefix_t) },
|
||||
{ { 0,0,0,0, 0,0,0,0, 0,0,0,0 } }
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "dds__entity.h"
|
||||
#include "dds/ddsi/q_config.h"
|
||||
#include "dds/ddsi/q_bswap.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/ddsi_domaingv.h"
|
||||
#include "dds/ddsi/q_radmin.h"
|
||||
#include "dds/ddsi/q_entity.h"
|
||||
#include "dds/ddsi/q_gc.h"
|
||||
|
@ -167,7 +167,7 @@ static uint64_t store (struct ddsi_tkmap *tkmap, struct dds_rhc *rhc, struct pro
|
|||
return iid;
|
||||
}
|
||||
|
||||
static struct proxy_writer *mkwr (const struct q_globals *gv, bool auto_dispose)
|
||||
static struct proxy_writer *mkwr (const struct ddsi_domaingv *gv, bool auto_dispose)
|
||||
{
|
||||
struct proxy_writer *pwr;
|
||||
struct dds_qos *xqos;
|
||||
|
@ -191,7 +191,7 @@ static void fwr (struct proxy_writer *wr)
|
|||
free (wr);
|
||||
}
|
||||
|
||||
static struct dds_rhc *mkrhc (struct q_globals *gv, dds_reader *rd, dds_history_kind_t hk, int32_t hdepth, dds_destination_order_kind_t dok)
|
||||
static struct dds_rhc *mkrhc (struct ddsi_domaingv *gv, dds_reader *rd, dds_history_kind_t hk, int32_t hdepth, dds_destination_order_kind_t dok)
|
||||
{
|
||||
struct dds_rhc *rhc;
|
||||
dds_qos_t rqos;
|
||||
|
@ -560,9 +560,9 @@ static dds_entity_t readcond_wrapper (dds_entity_t reader, uint32_t mask, dds_qu
|
|||
return dds_create_readcondition (reader, mask);
|
||||
}
|
||||
|
||||
static struct q_globals *get_gv (dds_entity_t e)
|
||||
static struct ddsi_domaingv *get_gv (dds_entity_t e)
|
||||
{
|
||||
struct q_globals *gv;
|
||||
struct ddsi_domaingv *gv;
|
||||
dds_entity *x;
|
||||
if (dds_entity_pin (e, &x) < 0)
|
||||
abort ();
|
||||
|
@ -594,7 +594,7 @@ static void test_conditions (dds_entity_t pp, dds_entity_t tp, const int count,
|
|||
dds_entity_unlock (x);
|
||||
}
|
||||
|
||||
const struct q_globals *gv = get_gv (pp);
|
||||
const struct ddsi_domaingv *gv = get_gv (pp);
|
||||
struct ddsi_tkmap *tkmap = gv->m_tkmap;
|
||||
struct proxy_writer *wr[] = { mkwr (gv, 0), mkwr (gv, 1), mkwr (gv, 1) };
|
||||
|
||||
|
@ -929,7 +929,7 @@ int main (int argc, char **argv)
|
|||
|
||||
if (0 >= first)
|
||||
{
|
||||
struct q_globals *gv = get_gv (pp);
|
||||
struct ddsi_domaingv *gv = get_gv (pp);
|
||||
struct ddsi_tkmap *tkmap = gv->m_tkmap;
|
||||
if (print)
|
||||
printf ("************* 0 *************\n");
|
||||
|
@ -980,7 +980,7 @@ int main (int argc, char **argv)
|
|||
|
||||
if (1 >= first)
|
||||
{
|
||||
struct q_globals *gv = get_gv (pp);
|
||||
struct ddsi_domaingv *gv = get_gv (pp);
|
||||
struct ddsi_tkmap *tkmap = gv->m_tkmap;
|
||||
if (print)
|
||||
printf ("************* 1 *************\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue