pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:588:    COMMA_DLOC_DECL)   {    USE_DLOC_ARGS();    THREADS_FPRINTF (2, "Swap out %sthread %p @ %s:%d\n",    ts == Pike_interpreter.thread_state ? "current " : "",    ts, DLOC_ARGS_OPT);      #ifdef PROFILING    if (!ts->swapped) {    cpu_time_t now = get_cpu_time(); - #ifdef PROFILING_DEBUG -  fprintf(stderr, "%p: Swap out at: %" PRINT_CPU_TIME +  W_PROFILING_DEBUG("%p: Swap out at: %" PRINT_CPU_TIME    " unlocked: %" PRINT_CPU_TIME "\n",    ts, now, ts->state.unlocked_time); - #endif +     ts->state.unlocked_time -= now;    }   #endif       ts->swapped=1;       Pike_interpreter_pointer = NULL;   }      PMOD_EXPORT void pike_swap_in_thread (struct thread_state *ts
pike.git/src/threads.c:619: Inside #if defined(PIKE_DEBUG)
   pike_fatal_dloc ("Thread %"PRINTSIZET"x swapped in "    "over existing thread %"PRINTSIZET"x.\n",    (size_t) ts->id,    (size_t) (Pike_interpreter.thread_state ?    Pike_interpreter.thread_state->id : 0));   #endif      #ifdef PROFILING    if (ts->swapped) {    cpu_time_t now = get_cpu_time(); - #ifdef PROFILING_DEBUG -  fprintf(stderr, "%p: Swap in at: %" PRINT_CPU_TIME +  W_PROFILING_DEBUG("%p: Swap in at: %" PRINT_CPU_TIME    " unlocked: %" PRINT_CPU_TIME "\n",    ts, now, ts->state.unlocked_time); - #endif - /* This will not work, since Pike_interpreter_pointer is always null here... */ - /* #ifdef PIKE_DEBUG */ - /* if (now < -Pike_interpreter.unlocked_time) { */ - /* pike_fatal_dloc("Time at swap in is before time at swap out." */ - /* " %" PRINT_CPU_TIME " < %" PRINT_CPU_TIME */ - /* "\n", now, -Pike_interpreter.unlocked_time); */ - /* } */ - /* #endif */ +  +  /* Pike_interpreter_pointer is always null here... */    ts->state.unlocked_time += now;    }   #endif       ts->swapped=0;    Pike_interpreter_pointer = &ts->state;   #ifdef PIKE_DEBUG    thread_swaps++;   #endif