Changeset 418 for trunk/kernel
- Timestamp:
- Jan 8, 2018, 2:25:39 PM (7 years ago)
- Location:
- trunk/kernel
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/chdev.c
r408 r418 123 123 uint32_t save_sr; // for critical section 124 124 125 #if CONFIG_READ_DEBUG 126 enter_chdev_cmd = hal_time_stamp(); 127 #endif 128 125 129 thread_t * this = CURRENT_THREAD; 126 130 … … 187 191 hal_restore_irq( save_sr ); 188 192 193 #if CONFIG_READ_DEBUG 194 exit_chdev_cmd = hal_time_stamp(); 195 #endif 196 189 197 } // end chdev_register_command() 190 198 … … 253 261 xlist_unlink( XPTR( client_cxy , &client_ptr->wait_list ) ); 254 262 remote_spinlock_unlock( lock_xp ); 263 264 // unblock client thread 265 thread_unblock( client_xp , THREAD_BLOCKED_IO ); 255 266 256 267 chdev_dmsg("\n[DBG] %s : thread %x complete operation for client %x / cycle %d\n", -
trunk/kernel/kern/thread.c
r416 r418 868 868 869 869 } 870 else // yield each ~ 100000 cycles 871 870 else // search a runable thread 872 871 { 873 hal_fixed_delay( 500000);872 sched_yield( "IDLE" ); 874 873 } 875 876 // force scheduling at each iteration 877 sched_yield( "idle" ); 878 } 874 } 879 875 } // end thread_idle() 880 876 -
trunk/kernel/kern/thread.h
r416 r418 133 133 void * cpu_context; /*! pointer on CPU context switch */ 134 134 void * fpu_context; /*! pointer on FPU context switch */ 135 void * uzone; /*! pointer on uzone for hal_kentry*/135 void * uzone; /*! used by hal_do_syscakl & hal_do_except */ 136 136 137 137 intptr_t k_stack_base; /*! kernel stack base address */ -
trunk/kernel/syscalls/sys_panic.c
r410 r418 47 47 if( error ) 48 48 { 49 printk("\n[USER DBG] thread %x / process %x/ core[%x,%d] / cycle %d\n"49 printk("\n[USER PANIC] thread %x / process %x/ core[%x,%d] / cycle %d\n" 50 50 "cause unknown, because string not in user space\n", 51 51 this->trdid , process->pid , local_cxy , core->lid , … … 56 56 if( hal_strlen_from_uspace( string ) >= 256 ) 57 57 { 58 printk("\n[USER DBG] thread %x / process %x/ core[%x,%d] / cycle %d\n"58 printk("\n[USER PANIC] thread %x / process %x/ core[%x,%d] / cycle %d\n" 59 59 "cause unknown, because string larger than 256 characters\n", 60 60 this->trdid , process->pid , local_cxy , core->lid , … … 66 66 67 67 // print user debug message on kernel terminal 68 printk("\n[USER DBG] thread %x / process %x / core[%x,%d] / cycle %d\n %s\n",68 printk("\n[USER PANIC] thread %x / process %x / core[%x,%d] / cycle %d\n %s\n", 69 69 this->trdid , process->pid , local_cxy, core->lid , 70 70 (uint32_t)hal_get_cycles() , kbuf ); … … 72 72 return 0; 73 73 74 } // end sys_ get_cycle()74 } // end sys_panic() -
trunk/kernel/syscalls/sys_read.c
r416 r418 64 64 reg_t save_sr; // required to enable IRQs during syscall 65 65 66 #if CONFIG_ SYSCALL_DEBUG67 uint 32_t tm_start;68 uint 32_t tm_end;66 #if CONFIG_READ_DEBUG 67 uint64_t tm_start; 68 uint64_t tm_end; 69 69 tm_start = hal_get_cycles(); 70 70 #endif 71 71 72 72 #if CONFIG_READ_DEBUG 73 enter_sys_read = tm_start;73 enter_sys_read = (uint32_t)tm_start; 74 74 #endif 75 75 … … 98 98 99 99 // enable IRQs 100 hal_enable_irq( &save_sr );100 // hal_enable_irq( &save_sr ); 101 101 102 102 // get extended pointer on remote file descriptor … … 158 158 159 159 // restore IRQs 160 hal_restore_irq( save_sr );160 // hal_restore_irq( save_sr ); 161 161 162 162 hal_fence(); 163 163 164 #if CONFIG_ SYSCALL_DEBUG164 #if CONFIG_READ_DEBUG 165 165 tm_end = hal_get_cycles(); 166 166 printk("\n[DBG] %s : core[%x,%d] / thread %x in process %x / cycle %d\n" … … 171 171 #endif 172 172 173 #if CONFIG_READ_DEBUG 174 exit_sys_read = tm_end;173 #if CONFIG_READ_DEBUG 174 exit_sys_read = (uint32_t)tm_end; 175 175 176 176 printk("\n@@@@@@@@@@@@ timing to read character %c\n" -
trunk/kernel/syscalls/sys_write.c
r416 r418 46 46 reg_t save_sr; // required to enable IRQs during syscall 47 47 48 #if CONFIG_ SYSCALL_DEBUG48 #if CONFIG_WRITE_DEBUG 49 49 uint32_t tm_start; 50 50 uint32_t tm_end; … … 139 139 hal_fence(); 140 140 141 #if CONFIG_ SYSCALL_DEBUG141 #if CONFIG_WRITE_DEBUG 142 142 tm_end = hal_get_cycles(); 143 143 printk("\n[DBG] %s : core[%x,%d] / thread %x in process %x / cycle %d\n" … … 148 148 #endif 149 149 150 #if CONFIG_WRITE_DEBUG 151 printk("\n@@@@@@@@@@@@ timing to write character %c\n" 152 " - enter_sys_write = %d\n" 153 " - exit_sys_write = %d\n", 154 *((char *)(intptr_t)paddr) , (uint32_t)tm_start , (uint32_t)tm_end ); 155 #endif 156 150 157 return nbytes; 151 158
Note: See TracChangeset
for help on using the changeset viewer.