Files
rtems/cpukit/libcsupport/src
Matt Joyce 6d4b390f99 Support _REENT_THREAD_LOCAL Newlib configuration
In case the Newlib _REENT_THREAD_LOCAL configuration option is enabled, the
struct _reent is not defined (there is only a forward declaration in
<sys/reent.h>).  Instead, the usual members of struct _reent are available as
dedicatd thread-local storage objects.

Update #4560.
2022-07-21 07:22:13 +02:00
..
2020-04-16 07:30:00 +02:00
2020-04-16 07:30:00 +02:00
2020-04-16 07:30:00 +02:00
2022-05-04 09:12:07 -05:00
2020-04-16 07:30:00 +02:00
2020-04-16 07:30:00 +02:00
2020-04-16 07:30:00 +02:00
2020-04-16 07:30:00 +02:00
2021-09-20 13:31:25 -05:00
2021-08-02 07:14:05 +02:00
2020-04-16 07:30:00 +02:00
2021-08-02 07:14:05 +02:00

--

Overview of newlib support (newlib is from CYGNUS)
    Each task can have its own libc state including:
        open stdio files
        strtok
        multi precision arithmetic state
        etc.

    This is implemented by a reentrancy data structure for each task.

    When a task is "started" (in RTEMS sense) the reentrancy structure
    is allocated.

    When task is switched to, the value of global variable _impure_ptr
    is changed to the value of the new tasks reentrancy structure.

    When a task is deleted
        atexit() processing (for that task) happens
        task's stdio buffers are flushed

    When exit(3) is called
        calling task's atexit processing done
        global libc state atexit processing done
            (this will include any atexit routines installed by drivers)
        executive is shutdown
            causes a context switch back to bsp land


NOTE:
    libc extension are installed by bsp_libc_init()
        iff we are using clock interrupts.
        This hack is necessary to allow the tmtests to avoid
        timing the extensions.