Changeset 438 for trunk/kernel/syscalls/sys_write.c
- Timestamp:
- Apr 4, 2018, 2:49:02 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_write.c
r435 r438 46 46 reg_t save_sr; // required to enable IRQs during syscall 47 47 48 #if ( CONFIG_DEBUG_SYS_WRITE_DEBUG & 1)48 #if (DEBUG_SYS_WRITE_DEBUG & 1) 49 49 enter_sys_read = (uint32_t)tm_start; 50 50 #endif … … 53 53 process_t * process = this->process; 54 54 55 #if CONFIG_DEBUG_SYS_WRITE55 #if DEBUG_SYS_WRITE 56 56 uint32_t tm_start; 57 57 uint32_t tm_end; 58 58 tm_start = hal_get_cycles(); 59 if( CONFIG_DEBUG_SYS_WRITE < tm_start )59 if( DEBUG_SYS_WRITE < tm_start ) 60 60 printk("\n[DBG] %s : thread %x enter / process %x / vaddr %x / count %d / cycle %d\n", 61 61 __FUNCTION__, this, process->pid, vaddr, count, (uint32_t)tm_start ); … … 66 66 { 67 67 68 #if CONFIG_DEBUG_SYSCALLS_ERROR68 #if DEBUG_SYSCALLS_ERROR 69 69 printk("\n[ERROR] in %s : illegal file descriptor index\n", __FUNCTION__ ); 70 70 #endif … … 79 79 { 80 80 81 #if CONFIG_DEBUG_SYSCALLS_ERROR81 #if DEBUG_SYSCALLS_ERROR 82 82 printk("\n[ERROR] in %s : user buffer unmapped = %x\n", __FUNCTION__ , (intptr_t)vaddr ); 83 83 #endif … … 95 95 { 96 96 97 #if CONFIG_DEBUG_SYSCALLS_ERROR97 #if DEBUG_SYSCALLS_ERROR 98 98 printk("\n[ERROR] in %s : undefined file descriptor index = %d in process %x\n", 99 99 __FUNCTION__ , file_id , process->pid ); … … 119 119 { 120 120 121 #if CONFIG_DEBUG_SYSCALLS_ERROR121 #if DEBUG_SYSCALLS_ERROR 122 122 printk("\n[ERROR] in %s : file %d not writable in process %x\n", 123 123 __FUNCTION__ , file_id , process->pid ); … … 150 150 { 151 151 152 #if CONFIG_DEBUG_SYSCALLS_ERROR152 #if DEBUG_SYSCALLS_ERROR 153 153 printk("\n[ERROR] in %s cannot write data to file %d in process %x\n", 154 154 __FUNCTION__ , file_id , process->pid ); … … 163 163 hal_fence(); 164 164 165 #if CONFIG_DEBUG_SYS_WRITE165 #if DEBUG_SYS_WRITE 166 166 tm_end = hal_get_cycles(); 167 if( CONFIG_DEBUG_SYS_WRITE < tm_end )167 if( DEBUG_SYS_WRITE < tm_end ) 168 168 printk("\n[DBG] %s : thread %x exit / process %x / cycle %d\n" 169 169 "nbytes = %d / first byte = %c / file_id = %d / cost = %d\n", … … 172 172 #endif 173 173 174 #if ( CONFIG_DEBUG_SYS_WRITE & 1)174 #if (DEBUG_SYS_WRITE & 1) 175 175 exit_sys_write = (uint32_t)tm_end; 176 176
Note: See TracChangeset
for help on using the changeset viewer.