RTI Connext C API Version 7.4.0

User-managed thread infrastructure. More...

Data Structures

struct  DDS_ThreadFactory
 <<extension>> <<interface>> Interface for providing the threads needed by the middleware. It consists of operations to create and delete threads. The interface depends on the DDS_ThreadFactory_OnSpawnedFunction that specifies the operation to run in the new thread. More...
 

Macros

#define DDS_ThreadFactory_INITIALIZER
 <<extension>> Initializer for new DDS_ThreadFactory. More...
 

Typedefs

typedef void *(* DDS_ThreadFactory_OnSpawnedFunction) (void *thread_param)
 Prototype of the function that must be called on a new thread created by a DDS_ThreadFactory. More...
 
typedef void *(* DDS_ThreadFactory_CreateThreadCallback) (void *factory_data, const char *thread_name, const struct DDS_ThreadSettings_t *settings, DDS_ThreadFactory_OnSpawnedFunction on_spawned, void *threadParam)
 Prototype of a DDS_ThreadFactory create_thread function. More...
 
typedef void(* DDS_ThreadFactory_DeleteThreadCallback) (void *factory_data, void *thread)
 Prototype of a DDS_ThreadFactory delete_thread function. More...
 

Detailed Description

User-managed thread infrastructure.

Core feature that allows users to provide the threads to RTI Connext.

"::DDS_ThreadFactory"

The model follows the abstract factory pattern. A DDS_ThreadFactory instance can be set in the DDS_DomainParticipantFactory so that DDS_DomainParticipant will use it for thread creation and deletion.

Macro Definition Documentation

◆ DDS_ThreadFactory_INITIALIZER

#define DDS_ThreadFactory_INITIALIZER

<<extension>> Initializer for new DDS_ThreadFactory.

No memory is allocated. New DDS_ThreadFactory instances stored in the stack should be initialized with this value before they are passed to any functions.

Typedef Documentation

◆ DDS_ThreadFactory_OnSpawnedFunction

typedef void *(* DDS_ThreadFactory_OnSpawnedFunction) (void *thread_param)

Prototype of the function that must be called on a new thread created by a DDS_ThreadFactory.

Parameters
thread_param<<in>> Single argument that this operation receives. It is the data this operation needs to perform.

◆ DDS_ThreadFactory_CreateThreadCallback

typedef void *(* DDS_ThreadFactory_CreateThreadCallback) (void *factory_data, const char *thread_name, const struct DDS_ThreadSettings_t *settings, DDS_ThreadFactory_OnSpawnedFunction on_spawned, void *threadParam)

Prototype of a DDS_ThreadFactory create_thread function.

Parameters
factory_data<<in>> Data associated with the factory when the factory is set.
thread_name<<in>> Name of the thread given by the middleware.
settings<<in>> Attributes of the new thread (i.e., priority, stack size, etc.). These attributes are specified in the QoS settings corresponding to each kind of thread (i.e., database, event, etc).
on_spawned<<in>> Function provided by the middleware to be called in the newly created thread.
threadParam<<in>> Parameters provided by the middleware to be passed in the call to on_spawned.
Returns
An opaque pointer to the newly created thread. The same pointer will be provided to the DDS_ThreadFactory::delete_thread operation when deletion is requested.

◆ DDS_ThreadFactory_DeleteThreadCallback

typedef void(* DDS_ThreadFactory_DeleteThreadCallback) (void *factory_data, void *thread)

Prototype of a DDS_ThreadFactory delete_thread function.

Parameters
factory_data<<in>> Data associated with the factory when the factory is set.
thread<<in>> Thread to be deleted. The thread was previously created by the same DDS_ThreadFactory.