Changeset 436 for trunk/kernel/devices
- Timestamp:
- Mar 7, 2018, 9:02:03 AM (7 years ago)
- Location:
- trunk/kernel/devices
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/devices/dev_nic.c
r408 r436 130 130 131 131 // block on THREAD_BLOCKED_IO condition and deschedule 132 thread_block( thread_ptr, THREAD_BLOCKED_IO );132 thread_block( XPTR( local_cxy , thread_ptr ) , THREAD_BLOCKED_IO ); 133 133 sched_yield("client blocked on I/O"); 134 134 … … 200 200 201 201 // block on THREAD_BLOCKED I/O condition and deschedule 202 thread_block( thread_ptr, THREAD_BLOCKED_IO );202 thread_block( XPTR( local_cxy , thread_ptr ) , THREAD_BLOCKED_IO ); 203 203 sched_yield("client blocked on I/O"); 204 204 -
trunk/kernel/devices/dev_txt.c
r435 r436 131 131 thread_t * this = CURRENT_THREAD; 132 132 133 #if (CONFIG_DEBUG_SYS_READ & 1)134 enter_txt_read = hal_time_stamp();135 #endif136 137 #if (CONFIG_DEBUG_SYS_WRITE & 1)138 enter_txt_write = hal_time_stamp();139 #endif140 141 #if CONFIG_DEBUG_DEV_TXT142 uint32_t cycle = (uint32_t)hal_get_cycles();143 if( CONFIG_DEBUG_DEV_TXT < cycle )144 printk("\n[DBG] %s : thread %x enters / cycle %d\n",145 __FUNCTION__, CURRENT_THREAD , cycle );146 #endif147 148 133 // check channel argument 149 134 assert( (channel < CONFIG_MAX_TXT_CHANNELS) , __FUNCTION__ , "illegal channel index" ); … … 166 151 chdev_register_command( dev_xp ); 167 152 168 #if CONFIG_DEBUG_DEV_TXT169 cycle = (uint32_t)hal_get_cycles();170 if( CONFIG_DEBUG_DEV_TXT < cycle )171 printk("\n[DBG] %s : thread %x exit / cycle %d\n",172 __FUNCTION__, CURRENT_THREAD , cycle );173 #endif174 175 #if (CONFIG_DEBUG_SYS_READ & 1)176 exit_txt_read = hal_time_stamp();177 #endif178 179 #if (CONFIG_DEBUG_SYS_WRITE & 1)180 exit_txt_write = hal_time_stamp();181 #endif182 183 153 // return I/O operation status from calling thread descriptor 184 154 return this->txt_cmd.error; … … 190 160 uint32_t count ) 191 161 { 162 163 #if (CONFIG_DEBUG_SYS_WRITE & 1) 164 enter_txt_write = hal_time_stamp(); 165 #endif 166 167 #if CONFIG_DEBUG_DEV_TXT_TX 168 uint32_t cycle = (uint32_t)hal_get_cycles(); 169 if( CONFIG_DEBUG_DEV_TXT_TX < cycle ) 170 printk("\n[DBG] %s : thread %x enters / cycle %d\n", __FUNCTION__, CURRENT_THREAD, cycle ); 171 #endif 172 192 173 return dev_txt_access( TXT_WRITE , channel , buffer , count ); 174 175 #if CONFIG_DEBUG_DEV_TXT_TX 176 cycle = (uint32_t)hal_get_cycles(); 177 if( CONFIG_DEBUG_DEV_TXT_TX < cycle ) 178 printk("\n[DBG] %s : thread %x exit / cycle %d\n", __FUNCTION__, CURRENT_THREAD, cycle ); 179 #endif 180 181 #if (CONFIG_DEBUG_SYS_WRITE & 1) 182 exit_txt_write = hal_time_stamp(); 183 #endif 184 193 185 } 194 186 … … 197 189 char * buffer ) 198 190 { 191 192 #if (CONFIG_DEBUG_SYS_READ & 1) 193 enter_txt_read = hal_time_stamp(); 194 #endif 195 196 #if CONFIG_DEBUG_DEV_TXT_RX 197 uint32_t cycle = (uint32_t)hal_get_cycles(); 198 if( CONFIG_DEBUG_DEV_TXT_RX < cycle ) 199 printk("\n[DBG] %s : thread %x enters / cycle %d\n", __FUNCTION__, CURRENT_THREAD, cycle ); 200 #endif 201 199 202 return dev_txt_access( TXT_READ , channel , buffer , 1 ); 203 204 #if CONFIG_DEBUG_DEV_TXT_RX 205 cycle = (uint32_t)hal_get_cycles(); 206 if( CONFIG_DEBUG_DEV_TXT_RX < cycle ) 207 printk("\n[DBG] %s : thread %x exit / cycle %d\n", __FUNCTION__, CURRENT_THREAD, cycle ); 208 #endif 209 210 #if (CONFIG_DEBUG_SYS_READ & 1) 211 exit_txt_read = hal_time_stamp(); 212 #endif 213 200 214 } 201 215
Note: See TracChangeset
for help on using the changeset viewer.