AzureMXChip/MXCHIPAZ3166/core/lib/threadx/ports/xtensa/xcc/src/tx_clib_lock.c
void
_tx_clib_reent_init (TX_THREAD * thread_ptr)
{
    if (thread_ptr == NULL) {
        /* Should never happen */
        return;
    }

#if XSHAL_CLIB == XTHAL_CLIB_NEWLIB
    struct _reent * reent = &(thread_ptr->tx_thread_clib_reent);

    memset (reent, 0, sizeof(struct _reent));
    _REENT_INIT_PTR (reent);
    thread_ptr->tx_thread_clib_ptr = reent;
#endif

#if XSHAL_CLIB == XTHAL_CLIB_XCLIB
    thread_ptr->tx_thread_clib_ptr = &(thread_ptr->tx_thread_clib_reent);
    _init_reent (thread_ptr->tx_thread_clib_ptr);
#endif
}
/**************************************************************************/
/*    _tx_clib_reent_init - initialize C library thread reent structure.  */
/*    Called by tx_thread_create() to init per-thread C library state.    */
/**************************************************************************/
initialize C library thread reent structure.
Called by tx_thread_create() to init per-thread C library state.
initialize C library thread reent structure . Called by tx_thread_create () to init per - thread C library state .
void
_tx_clib_reent_init (TX_THREAD * thread_ptr)
{
    if (thread_ptr == NULL) {
        return;
    }
#if XSHAL_CLIB == XTHAL_CLIB_NEWLIB
    struct _reent * reent = &(thread_ptr->tx_thread_clib_reent);
    memset (reent, 0, sizeof(struct _reent));
    _REENT_INIT_PTR (reent);
    thread_ptr->tx_thread_clib_ptr = reent;
#endif
#if XSHAL_CLIB == XTHAL_CLIB_XCLIB
    thread_ptr->tx_thread_clib_ptr = &(thread_ptr->tx_thread_clib_reent);
    _init_reent (thread_ptr->tx_thread_clib_ptr);
#endif
}
void _tx_clib_reent_init ( TX_THREAD * thread_ptr ) { if ( thread_ptr == NULL ) { return ; } #if XSHAL_CLIB == XTHAL_CLIB_NEWLIB struct _reent * reent = & ( thread_ptr -> tx_thread_clib_reent ) ; memset ( reent , 0 , sizeof ( struct _reent ) ) ; _REENT_INIT_PTR ( reent ) ; thread_ptr -> tx_thread_clib_ptr = reent ; #endif #if XSHAL_CLIB == XTHAL_CLIB_XCLIB thread_ptr -> tx_thread_clib_ptr = & ( thread_ptr -> tx_thread_clib_reent ) ; _init_reent ( thread_ptr -> tx_thread_clib_ptr ) ; #endif }
_tx_clib_reent_init - initialize C library thread reent structure.
_tx_clib_reent_init - initialize C library thread reent structure .
/* Should never happen */