You are here: Part 3: Advanced Concepts > Connext DDS Threading Model > Configuring Thread Settings with XML

Configuring Thread Settings with XML

Table 1 describes the XML tags that you can use to configure thread settings. For more information on thread settings, see:

Table 1 XML Tags for ThreadSettings_t

Tags within <thread>

Description

Number of Tags Allowed

<cpu_list>

Each <element> specifies a processor on which the thread may run.

<cpu_list>

<element>value</element>

</cpu_list>

Only applies to platforms that support controlling CPU core affinity (see Controlling CPU Core Affinity for RTI Threads and the Platform Notes).

0 or 1

<cpu_
rotation>

Determines how the CPUs in <cpu_list> will be used by the thread. The value can be either:

THREAD_SETTINGS_CPU_NO_ROTATION

The thread can run on any listed processor, as determined by OS scheduling.

THREAD_SETTINGS_CPU_RR_ROTATION

The thread will be assigned a CPU from the list in round-robin order.

Only applies to platforms that support controlling CPU core affinity (see the Platform Notes).

0 or 1

<mask>

A collection of flags used to configure threads of execution. Not all of these options may be relevant for all operating systems. May include these bits:

  • STDIO

  • FLOATING_POINT

  • REALTIME_PRIORITY

  • PRIORITY_ENFORCE

It can also be set to a combination of the above bits by using the “or” symbol (|), such as STDIO|FLOATING_POINT.

Default: MASK_DEFAULT

0 or 1

<priority>

Thread priority. The value can be specified as an unsigned integer or one of the following strings.

  • THREAD_PRIORITY_DEFAULT

  • THREAD_PRIORITY_HIGH

  • THREAD_PRIORITY_ABOVE_NORMAL

  • THREAD_PRIORITY_NORMAL

  • THREAD_PRIORITY_BELOW_NORMAL

  • THREAD_PRIORITY_LOW

When using an unsigned integer, the allowed range is platform-dependent.

When thread priorities are configured using XML, the values are considered native priorities.

Example:

<thread>
	<mask>STDIO|FLOATING_POINT</mask>
	<priority>10</priority>
<stack_size>THREAD_STACK_SIZE_DEFAULT</stack_size>
</thread>

When the XML file is loaded using the Java API, the priority is a native priority, not a Java thread priority.

0 or 1

<stack_
size>

Thread stack size, specified as an unsigned integer or set to the string THREAD_STACK_SIZE_DEFAULT. The allowed range is platform-dependent.

0 or 1

© 2015 RTI