Changeset 408 for trunk/kernel/syscalls/sys_write.c
- Timestamp:
- Dec 5, 2017, 4:20:07 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_write.c
r407 r408 40 40 { 41 41 error_t error; 42 paddr_t paddr; 43 xptr_t file_xp; 44 uint32_t nbytes; 45 42 paddr_t paddr; // unused, but required for user space checking 43 xptr_t file_xp; // remote file extended pointer 44 uint32_t nbytes; // number of bytes actually written 45 reg_t save_sr; // required to enable IRQs during syscall 46 46 uint32_t tm_start; 47 47 uint32_t tm_end; … … 70 70 return -1; 71 71 } 72 73 // enable IRQs 74 hal_enable_irq( &save_sr ); 72 75 73 76 // get extended pointer on remote file descriptor … … 128 131 } 129 132 133 // restore IRQs 134 hal_restore_irq( save_sr ); 135 130 136 hal_fence(); 131 137 132 138 tm_end = hal_get_cycles(); 133 139 134 syscall_dmsg("\n[DBG] %s : core[%x,%d] / thread %x / nbytes = %d/ cycle %d\n"135 " first byte = %c / file_id = %d / cost = %d\n",136 __FUNCTION__ , local_cxy , this->core->lid , this->trdid , nbytes , tm_start,137 *((char *)(intptr_t)paddr) , file_id , tm_end - tm_start );140 syscall_dmsg("\n[DBG] %s : core[%x,%d] / thread %x in process %x / cycle %d\n" 141 "nbytes = %d / first byte = %c / file_id = %d / cost = %d\n", 142 __FUNCTION__ , local_cxy , this->core->lid , this->trdid , this->process->pid , 143 tm_start , nbytes , *((char *)(intptr_t)paddr) , file_id , tm_end - tm_start ); 138 144 139 145 return nbytes;
Note: See TracChangeset
for help on using the changeset viewer.