pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:425:    if (th_running) {    THREAD_T self;    if (!debug_is_locked)    pike_fatal_dloc ("Interpreter not locked.\n");    self = th_self();    if (!th_equal (debug_locking_thread, self))    pike_fatal_dloc ("Interpreter not locked by this thread.\n");    }   }    - static unsigned LONGEST thread_swaps = 0; - static unsigned LONGEST check_threads_calls = 0; - static unsigned LONGEST check_threads_yields = 0; - static unsigned LONGEST check_threads_swaps = 0; + static unsigned INT64 thread_swaps = 0; + static unsigned INT64 check_threads_calls = 0; + static unsigned INT64 check_threads_yields = 0; + static unsigned INT64 check_threads_swaps = 0;   static void f__thread_swaps (INT32 UNUSED(args))    {push_ulongest (thread_swaps);}   static void f__check_threads_calls (INT32 UNUSED(args))    {push_ulongest (check_threads_calls);}   static void f__check_threads_yields (INT32 UNUSED(args))    {push_ulongest (check_threads_yields);}   static void f__check_threads_swaps (INT32 UNUSED(args))    {push_ulongest (check_threads_swaps);}      #else
pike.git/src/threads.c:1611: Inside #if defined(PROFILE_CHECK_THREADS)
   tps_int_mean,    tps_int_n > 1 ? sqrt (tps_int_m2 / (tps_int_n - 1)) : 0.0);    last_time = (unsigned long) now.tv_sec;    calls = yields = clock_checks = no_clock_advs = 0;    }    }   #endif       {   #ifdef PIKE_DEBUG -  unsigned LONGEST old_thread_swaps = thread_swaps; +  unsigned INT64 old_thread_swaps = thread_swaps;   #endif    pike_thread_yield();   #ifdef PIKE_DEBUG    if (thread_swaps != old_thread_swaps)    check_threads_swaps++;   #endif    }   }      PMOD_EXPORT void pike_thread_yield(void)
pike.git/src/threads.c:2030:    *! good idea.    *!    *! @returns    *! Returns the previous thread quanta in nanoseconds.    *!    *! @seealso    *! @[set_thread_quanta()], @[gethrtime()]    */   static void f_set_thread_quanta(INT32 args)   { -  LONGEST ns = 0; +  INT64 ns = 0;      #ifndef LONG_CPU_TIME_T    /* Convert to ticks. */    push_int(1000000000 / CPU_TIME_TICKS);    o_divide();   #endif    get_all_args("set_thread_quanta", args, "%l", &ns);    pop_n_elems(args);       push_int64(thread_quanta);