Ignore:
Timestamp:
Dec 20, 2017, 4:51:09 PM (6 years ago)
Author:
alain
Message:

Fix bugs in exec

File:
1 edited

Legend:

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

    r408 r409  
    2525#include <hal_types.h>
    2626#include <hal_uspace.h>
     27#include <hal_irqmask.h>
    2728#include <hal_special.h>
    2829#include <errno.h>
     
    4445    uint32_t     nbytes;          // number of bytes actually written
    4546    reg_t        save_sr;         // required to enable IRQs during syscall
    46         uint32_t     tm_start;
    47         uint32_t     tm_end;
    4847
    49         tm_start = hal_get_cycles();
     48#if CONFIG_SYSCALL_DEBUG
     49uint32_t     tm_start;
     50uint32_t     tm_end;
     51tm_start = hal_get_cycles();
     52#endif
    5053
    5154        thread_t   * this = CURRENT_THREAD;
     
    136139    hal_fence();
    137140
    138     tm_end = hal_get_cycles();
    139 
     141#if CONFIG_SYSCALL_DEBUG
     142tm_end = hal_get_cycles();
    140143syscall_dmsg("\n[DBG] %s : core[%x,%d] / thread %x in process %x / cycle %d\n"
    141144"nbytes = %d / first byte = %c / file_id = %d / cost = %d\n",
    142145__FUNCTION__ , local_cxy , this->core->lid , this->trdid , this->process->pid ,
    143146tm_start , nbytes , *((char *)(intptr_t)paddr) , file_id , tm_end - tm_start );
     147#endif
    144148 
    145149        return nbytes;
Note: See TracChangeset for help on using the changeset viewer.