Пример #1
0
static void s_signalHandlersInit()
{
   #if defined( HB_THREAD_SUPPORT ) && ( defined( HB_OS_UNIX ) || defined( HB_OS_UNIX_COMPATIBLE ) )
      pthread_t res;
      HB_STACK *pStack;

      s_serviceSetHBSig();

      pStack = hb_threadCreateStack( 0 );
      pthread_create( &res, NULL, s_signalListener, pStack );
   #else
      s_serviceSetHBSig();
   #endif

   #if defined( HB_THREAD_SUPPORT )
      HB_CRITICAL_INIT( s_ServiceMutex );
   #endif

   sp_hooks = hb_itemNew( NULL );
   hb_arrayNew( sp_hooks, 0 );
}
Пример #2
0
void wxTraceInit( void )
{
   FILE *fpTrace;

   #ifdef HB_THREAD_SUPPORT
      HB_CRITICAL_INIT( s_CriticalMutex );
   #endif

   if( s_bEmpty && hb_fsFile( ( BYTE *) "trace.log" ) )
   {
      /* Empty the file if it exists. */
      fpTrace = fopen( LOG_NAME, "w" );

      if( fpTrace )
      {
         fclose( fpTrace );
      }
      else
      {
         hb_errInternal( HB_EI_ERRUNRECOV, "Unable to create trace.log file", NULL, NULL );
      }
   }
}