module ti.sysbios.rts.iar.MultithreadSupport

Provide the kernel support needed for IAR re-entrant C run-time

This multi-thread support module uses hook functions, hook context, and an overloaded implementation of the C library's lock and thread local storage access functions to make C run-time library calls re-entrant. [ more ... ]
C synopsis target-domain sourced in ti/sysbios/rts/iar/MultithreadSupport.xdc
DETAILS
This multi-thread support module uses hook functions, hook context, and an overloaded implementation of the C library's lock and thread local storage access functions to make C run-time library calls re-entrant.
This module is used only with the IAR compiler.
To enable multi-thread support, load this module in your application configuration script.
  xdc.useModule('ti.sysbios.rts.iar.MultithreadSupport');
If your application is using a module which requires multi-thread support, then that module is responsible for loading this module. For example, the ti.posix.tirtos.Settings module will load this module. In this case, it is not necessary to load it explicitly.
When this module is used, it will contribute the IAR linker option --threaded_lib to the linker command.
When using the IAR Embedded Workbench IDE, if you enable thread support in your project settings, you must also include this module in your configuration (unless it is already used as described above). There is no mechanism for the IAR IDE to communicate the project selections to this module.
On memory limited devices, it is possible to disable the re-entrant support in order to minimize the memory footprint. See enableMultithreadSupport for details.
NOTE
Calling C run-time functions from SWI or HWI threads is not supported and will generate an exception if multi-thread support is enabled.
 
config MultithreadSupport_enableMultithreadSupport  // module-wide

Disable the multi-thread support feature

C synopsis target-domain
extern const Bool MultithreadSupport_enableMultithreadSupport;
 
DETAILS
When necessary, it is possible to disable the re-entrant support in order to minimize the memory footprint. For example, if using POSIX support on a memory limited device, you may disable re-entrant support by adding the following to your application configuration script.
  var MultithreadSupport = xdc.useModule('ti.sysbios.rts.iar.MultithreadSupport');
  MultithreadSupport.enableMultithreadSupport = false;
NOTE
When multi-thread support is disabled, errno will be a global symbol. If multiple threads are referencing errno, it will not be thread-safe.
Module-Wide Built-Ins

C synopsis target-domain
Types_ModuleId MultithreadSupport_Module_id();
// Get this module's unique id
 
Bool MultithreadSupport_Module_startupDone();
// Test if this module has completed startup
 
IHeap_Handle MultithreadSupport_Module_heap();
// The heap from which this module allocates memory
 
Bool MultithreadSupport_Module_hasMask();
// Test whether this module has a diagnostics mask
 
Bits16 MultithreadSupport_Module_getMask();
// Returns the diagnostics mask for this module
 
Void MultithreadSupport_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
 
Configuration settings sourced in ti/sysbios/rts/iar/MultithreadSupport.xdc
var MultithreadSupport = xdc.useModule('ti.sysbios.rts.iar.MultithreadSupport');
module-wide config parameters
 
 
 
config MultithreadSupport.enableMultithreadSupport  // module-wide

Disable the multi-thread support feature

Configuration settings
MultithreadSupport.enableMultithreadSupport = Bool true;
 
DETAILS
When necessary, it is possible to disable the re-entrant support in order to minimize the memory footprint. For example, if using POSIX support on a memory limited device, you may disable re-entrant support by adding the following to your application configuration script.
  var MultithreadSupport = xdc.useModule('ti.sysbios.rts.iar.MultithreadSupport');
  MultithreadSupport.enableMultithreadSupport = false;
NOTE
When multi-thread support is disabled, errno will be a global symbol. If multiple threads are referencing errno, it will not be thread-safe.
C SYNOPSIS
 
metaonly config MultithreadSupport.common$  // module-wide

Common module configuration parameters

Configuration settings
MultithreadSupport.common$ = Types.Common$ undefined;
 
DETAILS
All modules have this configuration parameter. Its name contains the '$' character to ensure it does not conflict with configuration parameters declared by the module. This allows new configuration parameters to be added in the future without any chance of breaking existing modules.
generated on Thu, 23 May 2019 00:23:09 GMT