Ignore:
Timestamp:
May 16, 2018, 4:15:22 PM (4 years ago)
Author:
alain
Message:

Fix few bugs whike debugging the sort multi-thread application.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/core.c

    r438 r443  
    4949        core->usage             = 0;
    5050        core->spurious_irqs     = 0;
    51         core->thread_idle       = NULL;
    5251        core->fpu_owner         = NULL;
    5352        core->rand_last         = hal_time_stamp() & 0xFFF;
     
    9089void core_compute_stats( core_t * core )
    9190{
    92         thread_t * idle  = core->thread_idle;
     91        thread_t * idle  = core->scheduler.idle;
    9392        uint32_t   ticks = core->ticks_nr;
    9493
     
    115114void core_reset_stats( core_t * core )
    116115{
    117         core->ticks_nr              = 0;
    118         core->usage                 = 0;
    119         core->thread_idle->ticks_nr = 0;
     116        thread_t * idle  = core->scheduler.idle;
     117
     118        core->ticks_nr = 0;
     119        core->usage    = 0;
     120        idle->ticks_nr = 0;
     121
    120122        hal_fence();
    121123}
Note: See TracChangeset for help on using the changeset viewer.