Changeset ac5f2442 in rtems


Ignore:
Timestamp:
Nov 25, 2015, 7:33:31 AM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
443c61ec
Parents:
8ce0b0cb
Message:

Require getreent()

This function is used by Newlib since 2013-07-09 (Git commit
9b51cd8c6b9cdd067d9648a7ab952884019c56a5).

Location:
cpukit
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • cpukit/configure.ac

    r8ce0b0cb rac5f2442  
    180180  AC_CHECK_TYPES([sighandler_t])
    181181])
     182
     183if test x"$RTEMS_USE_NEWLIB" = xyes ; then
     184  AC_CHECK_DECLS([__getreent],[],[AC_MSG_ERROR([__getreent() in <sys/reent.h> is mandatory])],[#include <sys/reent.h>])
     185fi
    182186
    183187RTEMS_CHECK_MULTIPROCESSING
  • cpukit/libcsupport/src/newlibc_reent.c

    r8ce0b0cb rac5f2442  
    3636)
    3737{
    38 #if !defined(__DYNAMIC_REENT__)
    39   if (_Thread_libc_reent == 0)
    40   {
    41     _REENT = _GLOBAL_REENT;
    42 
    43     _Thread_Set_libc_reent (&_REENT);
    44   }
    45 #endif
    46 
    4738  _REENT_INIT_PTR((creating_task->libc_reent)); /* GCC extension: structure constants */
    4839
  • cpukit/sapi/include/confdefs.h

    r8ce0b0cb rac5f2442  
    24182418#endif
    24192419
    2420 #if defined(RTEMS_NEWLIB) && defined(__DYNAMIC_REENT__)
     2420#if defined(RTEMS_NEWLIB)
    24212421  struct _reent *__getreent(void)
    24222422  {
  • cpukit/score/include/rtems/score/threadimpl.h

    r8ce0b0cb rac5f2442  
    7474#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
    7575SCORE_EXTERN Thread_Control *_Thread_Allocated_fp;
    76 #endif
    77 
    78 #if !defined(__DYNAMIC_REENT__)
    79 /**
    80  * The C library re-enter-rant global pointer. Some C library implementations
    81  * such as newlib have a single global pointer that changed during a context
    82  * switch. The pointer points to that global pointer. The Thread control block
    83  * holds a pointer to the task specific data.
    84  */
    85 SCORE_EXTERN struct _reent **_Thread_libc_reent;
    8676#endif
    8777
     
    15021492}
    15031493
    1504 #if !defined(__DYNAMIC_REENT__)
    1505 /**
    1506  * This routine returns the C library re-enterant pointer.
    1507  */
    1508 
    1509 RTEMS_INLINE_ROUTINE struct _reent **_Thread_Get_libc_reent( void )
    1510 {
    1511   return _Thread_libc_reent;
    1512 }
    1513 
    1514 /**
    1515  * This routine set the C library re-enterant pointer.
    1516  */
    1517 
    1518 RTEMS_INLINE_ROUTINE void _Thread_Set_libc_reent (
    1519   struct _reent **libc_reent
    1520 )
    1521 {
    1522   _Thread_libc_reent = libc_reent;
    1523 }
    1524 #endif
    1525 
    15261494/** @}*/
    15271495
  • cpukit/score/src/threaddispatch.c

    r8ce0b0cb rac5f2442  
    105105    );
    106106
    107 #if !defined(__DYNAMIC_REENT__)
    108     /*
    109      * Switch libc's task specific data.
    110      */
    111     if ( _Thread_libc_reent ) {
    112       executing->libc_reent = *_Thread_libc_reent;
    113       *_Thread_libc_reent = heir->libc_reent;
    114     }
    115 #endif
    116 
    117107    _User_extensions_Thread_switch( executing, heir );
    118108    _Thread_Save_fp( executing );
Note: See TracChangeset for help on using the changeset viewer.