AzureMXChip/MXCHIPAZ3166/core/lib/threadx/ports/xtensa/xcc/src/tx_clib_lock.c
void
_tx_clib_init (void)
{
#if XSHAL_CLIB == XTHAL_CLIB_NEWLIB
#ifdef THREADX_TESTSUITE
  /*  Priority inheritance causes printf() (which calls malloc()
      which calls __malloc_unlock() which calls tx_mutex_put()
      which calls _tx_mutex_priority_change() if TX_INHERIT is set)
      which causes the task to suspend and resume which sometimes
      changes execution order in the very sensitive testsuite
      and makes it fail.  So, for the testsuite, don't request
      priority inheritance (it doesn't need it in any case).  */
    tx_mutex_create (&clib_lock_mutex, "Clib lock", 0);
#else
    tx_mutex_create (&clib_lock_mutex, "Clib lock", TX_INHERIT);
#endif
#endif /* NEWLIB */

#if XSHAL_CLIB == XTHAL_CLIB_XCLIB
    /* Nothing. */
#endif /* XCLIB */
}
/**************************************************************************/
/*    _tx_clib_init - initialize C library thread safety support.         */
/*    Called by _tx_initialize_low_level().                               */
/**************************************************************************/
initialize C library thread safety support.
initialize C library thread safety support .
void
_tx_clib_init (void)
{
#if XSHAL_CLIB == XTHAL_CLIB_NEWLIB
#ifdef THREADX_TESTSUITE
    tx_mutex_create (&clib_lock_mutex, "Clib lock", 0);
#else
    tx_mutex_create (&clib_lock_mutex, "Clib lock", TX_INHERIT);
#endif
#endif 
#if XSHAL_CLIB == XTHAL_CLIB_XCLIB
#endif 
}
void _tx_clib_init ( void ) { #if XSHAL_CLIB == XTHAL_CLIB_NEWLIB #ifdef THREADX_TESTSUITE tx_mutex_create ( & clib_lock_mutex , " " , 0 ) ; #else tx_mutex_create ( & clib_lock_mutex , " " , TX_INHERIT ) ; #endif #endif #if XSHAL_CLIB == XTHAL_CLIB_XCLIB #endif }
_tx_clib_init - initialize C library thread safety support.
_tx_clib_init - initialize C library thread safety support .
/*  Priority inheritance causes printf() (which calls malloc()
      which calls __malloc_unlock() which calls tx_mutex_put()
      which calls _tx_mutex_priority_change() if TX_INHERIT is set)
      which causes the task to suspend and resume which sometimes
      changes execution order in the very sensitive testsuite
      and makes it fail.  So, for the testsuite, don't request
      priority inheritance (it doesn't need it in any case).  */ /* NEWLIB */ /* Nothing. */ /* XCLIB */