Changeset 409 for trunk/kernel/syscalls/sys_read.c
- Timestamp:
- Dec 20, 2017, 4:51:09 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_read.c
r408 r409 25 25 #include <hal_types.h> 26 26 #include <hal_uspace.h> 27 #include <hal_irqmask.h> 27 28 #include <hal_special.h> 28 29 #include <errno.h> … … 35 36 // TODO: concurrent user page(s) munmap need to be handled [AG] 36 37 37 // instrumentation38 // TODO : remove these debug variables 38 39 extern uint32_t enter_sys_read; 39 40 extern uint32_t enter_devfs_move; … … 62 63 uint32_t nbytes; // number of bytes actually read 63 64 reg_t save_sr; // required to enable IRQs during syscall 64 uint32_t tm_start; 65 uint32_t tm_end; 66 67 tm_start = hal_get_cycles(); 68 69 #if CONFIG_READ_START 65 66 #if CONFIG_SYSCALL_DEBUG 67 uint32_t tm_start; 68 uint32_t tm_end; 69 tm_start = hal_get_cycles(); 70 #endif 71 72 #if CONFIG_READ_DEBUG 70 73 enter_sys_read = tm_start; 71 74 #endif … … 159 162 hal_fence(); 160 163 161 tm_end = hal_get_cycles(); 164 #if CONFIG_SYSCALL_DEBUG 165 tm_end = hal_get_cycles(); 166 syscall_dmsg("\n[DBG] %s exit : core[%x,%d] / thread %x in process %x / cycle %d\n" 167 "nbytes = %d / first byte = %c / file_id = %d / cost = %d\n", 168 __FUNCTION__ , local_cxy , this->core->lid , this->trdid , this->process->pid , 169 tm_start , nbytes , *((char *)(intptr_t)paddr) , file_id , tm_end - tm_start ); 170 #endif 162 171 163 172 #if CONFIG_READ_DEBUG 164 173 exit_sys_read = tm_end; 165 174 166 printk("\n@@@@@@@@@@@@ timing ro read character %c\n"175 printk("\n@@@@@@@@@@@@ timing to read character %c\n" 167 176 " - enter_sys_read = %d / delta %d\n" 168 177 " - enter_devfs_move = %d / delta %d\n" … … 195 204 exit_sys_read , exit_sys_read - exit_devfs_move ); 196 205 #endif 197 198 syscall_dmsg("\n[DBG] %s : core[%x,%d] / thread %x in process %x / cycle %d\n"199 "nbytes = %d / first byte = %c / file_id = %d / cost = %d\n",200 __FUNCTION__ , local_cxy , this->core->lid , this->trdid , this->process->pid ,201 tm_start , nbytes , *((char *)(intptr_t)paddr) , file_id , tm_end - tm_start );202 206 203 207 return nbytes;
Note: See TracChangeset
for help on using the changeset viewer.