Ignore:
Timestamp:
Nov 10, 2018, 2:33:26 PM (6 years ago)
Author:
alain
Message:

Fix various bugs in sys_stat() and sys_mmap() functions.
Improve debug in other functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/syscalls/sys_kill.c

    r584 r594  
    7474tm_start = hal_get_cycles();
    7575if( DEBUG_SYS_KILL < tm_start )
    76 printk("\n[DBG] %s : thread[%x,%x] enter / process %x / %s / cycle %d\n",
     76printk("\n[%s] thread[%x,%x] enter / process %x / %s / cycle %d\n",
    7777__FUNCTION__, this->process->pid, this->trdid, pid,
    7878sig_type_str(sig_id), (uint32_t)tm_start );
     
    8686#if (DEBUG_SYS_KILL & 1)
    8787if( DEBUG_SYS_KILL < tm_start )
    88 printk("\n[DBG] %s : thread[%x,%x] get owner process %x in cluster %x\n",
     88printk("\n[%s] thread[%x,%x] get owner process %x in cluster %x\n",
    8989__FUNCTION__ , this->process->pid, this->trdid, owner_ptr, owner_cxy );
    9090#endif
     
    108108#if (DEBUG_SYS_KILL & 1)
    109109if( DEBUG_SYS_KILL < tm_start )
    110 printk("\n[DBG] %s : thread[%x,%x] get parent process %x in cluster %x\n",
     110printk("\n[%x] thread[%x,%x] get parent process %x in cluster %x\n",
    111111__FUNCTION__ , this->process->pid, this->trdid, parent_ptr, parent_cxy );
    112112#endif
     
    135135            thread_unblock( parent_main_xp , THREAD_BLOCKED_WAIT );
    136136
     137            // calling thread deschedules when it is itself a target thread
     138            if( this->process->pid == pid ) sched_yield("block itself");
     139
    137140            break;
    138141        }
     
    214217#if DEBUG_SYS_KILL
    215218if( DEBUG_SYS_KILL < tm_end )
    216 printk("\n[DBG] %s : thread[%x,%x] exit / process %x / %s / cost = %d / cycle %d\n",
     219printk("\n[%s] thread[%x,%x] exit / process %x / %s / cost = %d / cycle %d\n",
    217220__FUNCTION__ , this->process->pid, this->trdid, pid,
    218221sig_type_str(sig_id), (uint32_t)(tm_end - tm_start), (uint32_t)tm_end );
Note: See TracChangeset for help on using the changeset viewer.