Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 11 Current »

Description

Called by the application to assign a TLS (thread-local storage) ID for a specific purpose. See Thread Safety of the Compiler’s Run-Time Library for details on TLS. TLS IDs are assigned dynamically as needed by the application. Once assigned, TLS IDs cannot be un-assigned.

Files

os.h/os_tls.c

Prototype

Arguments

p_err

is a pointer to a variable that contains an error code returned by this function. Possible values are:

OS_ERR_NONE

If the call was successful and the caller was returned a TLS ID.

OS_ERR_TLS_NO_MORE_AVAIL

If you called OS_TLS_GetID() more than OS_CFG_TLS_TBL_SIZE times.

Returned Value

The next available TLS ID or OS_CFG_TLS_TBL_SIZE if there are no more TLS IDs available.

Required Configuration

OS_CFG_TLS_TBL_SIZE must be greater than 0 in os_cfg.h. Refer to µC-OS-III Configuration Manual.

Callers

Application.

Notes/Warnings

None

Example Usage

  • No labels