EtcPal  0.4.1
ETC Platform Abstraction Layer (EtcPal)
View other versions:
EtcPalThreadParams Struct Reference

Overview

A set of parameters for an etcpal_thread.

The members of this structure are not all honored on all platforms. Here is a breakdown:

Platform Priority Honored Stack Size Honored Thread Name Honored Platform Data Available
FreeRTOS Yes Yes Yes No
Linux No Yes Yes No
macOS No Yes Yes No
MQX Yes Yes Yes Yes, EtcPalThreadParamsMqx
Windows Yes Yes Yes No

Data Fields

unsigned int priority
 The priority of the thread. More...
 
unsigned int stack_size
 The stack size of the thread in bytes. More...
 
const char * thread_name
 A name for the thread, maximum length ETCPAL_THREAD_NAME_MAX_LENGTH.
 
void * platform_data
 Pointer to a platform-specific parameter structure. More...
 

Field Documentation

◆ platform_data

void* platform_data

Pointer to a platform-specific parameter structure.

This is used to set thread attributes that are not shared between platforms. Currently the only platform that has a valid value for this member is MQX, which has the following structure:

typedef struct EtcPalThreadParamsMqx
{
_mqx_uint task_attributes; // Corresponds to the TASK_ATTRIBUTES member of TASK_TEMPLATE_STRUCT
_mqx_uint time_slice; // Corresponds to the DEFAULT_TIME_SLICE member of TASK_TEMPLATE_STRUCT
} EtcPalThreadParamsMqx;

◆ priority

unsigned int priority

The priority of the thread.

Note that thread priority is not valid on all platforms.

◆ stack_size

unsigned int stack_size

The stack size of the thread in bytes.

This value is always in bytes and will be translated as appropriate for the underlying platform (e.g. converted to words for FreeRTOS).

Note that thread stack size is not valid on all platforms.


The documentation for this struct was generated from the following file: