Ignore:
Timestamp:
Mar 7, 2018, 9:02:03 AM (4 years ago)
Author:
alain
Message:

1) improve the threads and process destruction mechanism.
2) introduce FIFOs in the soclib_tty driver.

File:
1 edited

Legend:

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

    r435 r436  
    286286    next = sched_select( sched );
    287287
     288    // check next thread kernel_stack overflow
     289    assert( (next->signature == THREAD_SIGNATURE),
     290    __FUNCTION__ , "kernel stack overflow for thread %x\n", next );
     291
    288292    // check next thread attached to same core as the calling thread
    289     assert( (next->core == current->core), __FUNCTION__ ,
    290     "next core != current core\n");
     293    assert( (next->core == current->core),
     294    __FUNCTION__ , "next core %x != current core %x\n", next->core, current->core );
    291295
    292296    // check next thread not blocked when type != IDLE
     
    327331    {
    328332
    329 #if( CONFIG_DEBUG_SCHED_YIELD & 0x1 )
     333#if (CONFIG_DEBUG_SCHED_YIELD & 1)
    330334uint32_t cycle = (uint32_t)hal_get_cycles();
    331335if( CONFIG_DEBUG_SCHED_YIELD < cycle )
     
    354358    uint32_t       save_sr;
    355359
    356     if( lid >= LOCAL_CLUSTER->cores_nr )
    357     {
    358         printk("\n[ERROR] in %s : illegal local index %d in cluster %x\n",
    359         __FUNCTION__ , lid , local_cxy );
    360         return;
    361     }
     360    assert( (lid < LOCAL_CLUSTER->cores_nr), __FUNCTION__, "illegal core index %d\n", lid);
    362361
    363362    core_t       * core    = &LOCAL_CLUSTER->core_tbl[lid];
Note: See TracChangeset for help on using the changeset viewer.