Changeset 373 for trunk


Ignore:
Timestamp:
Aug 14, 2017, 2:43:27 PM (7 years ago)
Author:
max@…
Message:

Start using panic().

Location:
trunk/kernel/kern
Files:
2 edited

Legend:

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

    r367 r373  
    245245        if( process->th_nr != 0 )
    246246    {
    247             printk("\n[PANIC] in %s : process %x in cluster %x has still active threads\n",
    248                __FUNCTION__ , process->pid , local_cxy );
    249         hal_core_sleep();
     247        panic("process %x in cluster %x has still active threads\n",
     248              process->pid , local_cxy );
    250249    }
    251250
     
    590589void process_remove_thread( thread_t * thread )
    591590{
    592     if( thread == NULL )
    593     {
    594         printk("\n[PANIC] in %s : thread argument is NULL\n", __FUNCTION__ );
    595         hal_core_sleep();
    596     }
     591    assert( (thread != NULL) , __FUNCTION__ , "thread argument is NULL" );
    597592
    598593    process_t * process = thread->process;
  • trunk/kernel/kern/thread.c

    r367 r373  
    471471    if( core_lid >= LOCAL_CLUSTER->cores_nr )
    472472    {
    473         printk("\n[PANIC] in %s : illegal core_lid / cores = %d / lid = %d / cxy = %x\n",
    474                __FUNCTION__ , LOCAL_CLUSTER->cores_nr , core_lid , local_cxy );
    475         hal_core_sleep();
     473        panic("illegal core_lid / cores = %d / lid = %d / cxy = %x\n",
     474              LOCAL_CLUSTER->cores_nr , core_lid , local_cxy );
    476475    }
    477476
     
    737736
    738737        // force core to sleeping state
    739         hal_core_sleep();
     738        //hal_core_sleep();
    740739
    741740        idle_dmsg("\n[INFO] %s : core[%x][%d] wake up at cycle %d\n",
Note: See TracChangeset for help on using the changeset viewer.