Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

#2468 closed defect (fixed)

Add Thread Local Storage (TLS) support on x86

Reported by: Joel Sherrill Owned by: Sebastian Huber
Priority: normal Milestone: 5.1
Component: arch/i386 Version:
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

The x86 is one of the architectures which does not support Thread Local Storage. Each architecture requires target architecture specific support to provide this standard language feature.

Details on the implementation by the compiler may be found at http://wiki.osdev.org/Thread_Local_Storage.

Based on this information, I think a segment register needs to be added to the thread context and some hooks to the TLS implemented.

Architecture information on TLS implementation should be added to the CPU Supplement document as this is part of the ABI and context switch.

As part of effort, the documentation for the general procedure of adding target specific TLS support should be added to the porting guide or reviewed.

Change History (8)

comment:2 Changed on 02/15/17 at 14:20:42 by Sebastian Huber

Milestone: 4.12Indefinite
Owner: set to Needs Funding
Status: newassigned

comment:3 Changed on 06/12/17 at 09:07:42 by Sebastian Huber <sebastian.huber@…>

In [changeset:"cb0d9a0747b1be84fb669b1c71e55bf0d860d2f8/rtems" cb0d9a0/rtems]:

i386: Move _CPU_Context_Initialize()

Update #2468.

comment:4 Changed on 06/12/17 at 09:08:08 by Sebastian Huber <sebastian.huber@…>

In [changeset:"7b0c74ffb085656d67554102857224223ee03f88/rtems" 7b0c74ff/rtems]:

i386: Support thread-local storage (TLS)

Update #2468.

comment:5 Changed on 06/12/17 at 09:10:26 by Sebastian Huber

Component: Generalcpukit
Milestone: Indefinite4.12.0
Owner: changed from Needs Funding to Sebastian Huber
Status: assignedaccepted
Version: 4.12

comment:6 Changed on 06/12/17 at 09:10:43 by Sebastian Huber <sebastian.huber@…>

Resolution: fixed
Status: acceptedclosed

In [changeset:"44c9e330bf3e7d79aa79689e296bda275cf4d22f/rtems-docs" 44c9e33/rtems-docs]:

cpu-supplement: Update TLS support status

Close #2468.

comment:7 Changed on 10/16/17 at 06:19:06 by Sebastian Huber

Component: scorearch/i386

comment:8 Changed on 11/09/17 at 06:27:14 by Sebastian Huber

Milestone: 4.12.05.1

Milestone renamed

Note: See TracTickets for help on using tickets.