Changeset 605 for trunk/kernel/devices/dev_ioc.c
- Timestamp:
- Dec 3, 2018, 12:19:16 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/devices/dev_ioc.c
r565 r605 101 101 thread_t * this = CURRENT_THREAD; // pointer on client thread 102 102 103 #if ( DEV_IOC_RX || DEV_IOC_TX ) 104 uint32_t cycle = (uint32_t)hal_get_cycles(); 105 #endif 106 103 107 // software L2/L3 cache coherence for memory buffer 104 108 if( chdev_dir.iob ) … … 111 115 xptr_t dev_xp = chdev_dir.ioc[0]; 112 116 113 assert( (dev_xp != XPTR_NULL) , "undefined IOC chdev descriptor" ); 117 // check dev_xp 118 assert( (dev_xp != XPTR_NULL) , "undefined IOC chdev descriptor" ); 114 119 115 120 // register command in calling thread descriptor … … 125 130 chdev_register_command( dev_xp ); 126 131 132 #if(DEV_IOC_RX & 1) 133 if( (DEV_IOC_RX < cycle) && (cmd_type != IOC_WRITE) ) 134 printk("\n[%s] thread[%x,%x] resumes for RX\n", 135 __FUNCTION__, this->process->pid , this->trdid ) 136 #endif 137 138 #if(DEV_IOC_TX & 1) 139 if( (DEV_IOC_RX < cycle) && (cmd_type == IOC_WRITE) ) 140 printk("\n[%s] thread[%x,%x] resumes for TX\n", 141 __FUNCTION__, this->process->pid , this->trdid ) 142 #endif 143 127 144 // return I/O operation status 128 145 return this->ioc_cmd.error; … … 137 154 138 155 #if DEBUG_DEV_IOC_RX 139 uint32_t cycle = (uint32_t)hal_get_cycles(); 140 if( DEBUG_DEV_IOC_RX < cycle ) 141 printk("\n[DBG] %s : thread %x enters / lba %x / buffer %x / cycle %d\n", 142 __FUNCTION__ , this, lba, buffer, cycle ); 156 uint32_t cycle = (uint32_t)hal_get_cycles(); 157 thread_t * this = CURRENT_THREAD; 158 if( DEBUG_DEV_IOC_RX < cycle ) 159 printk("\n[%s] thread[%x,%x] enters / lba %x / buffer %x / cycle %d\n", 160 __FUNCTION__ , this->process->pid, this->trdid, lba, buffer, cycle ); 143 161 #endif 144 162 … … 148 166 cycle = (uint32_t)hal_get_cycles(); 149 167 if( DEBUG_DEV_IOC_RX < cycle ) 150 printk("\n[ DBG] %s : thread %xexit / lba %x / buffer %x / cycle %d\n",151 __FUNCTION__ , this , lba, buffer, cycle );168 printk("\n[%s] thread[%x,%x] exit / lba %x / buffer %x / cycle %d\n", 169 __FUNCTION__ , this->process->pid, this->trdid, lba, buffer, cycle ); 152 170 #endif 153 171 … … 161 179 162 180 #if DEBUG_DEV_IOC_TX 163 uint32_t cycle = (uint32_t)hal_get_cycles(); 181 uint32_t cycle = (uint32_t)hal_get_cycles(); 182 thread_t * this = CURRENT_THREAD; 164 183 if( DEBUG_DEV_IOC_TX < cycle ) 165 printk("\n[ DBG] %s : thread %xenters / lba %x / buffer %x / cycle %d\n",166 __FUNCTION__ , this , lba, buffer, cycle );184 printk("\n[%s] thread[%x,%x] enters / lba %x / buffer %x / cycle %d\n", 185 __FUNCTION__ , this->process->pid, this->trdid, lba, buffer, cycle ); 167 186 #endif 168 187 … … 172 191 cycle = (uint32_t)hal_get_cycles(); 173 192 if( DEBUG_DEV_IOC_TX < cycle ) 174 printk("\n[ DBG] %s : thread %xexit / lba %x / buffer %x / cycle %d\n",175 __FUNCTION__ , this , lba, buffer, cycle );193 printk("\n[%s] thread[%x,%x] exit / lba %x / buffer %x / cycle %d\n", 194 __FUNCTION__ , this->process->pid, this->trdid, lba, buffer, cycle ); 176 195 #endif 177 196 … … 189 208 uint32_t cycle = (uint32_t)hal_get_cycles(); 190 209 if( DEBUG_DEV_IOC_RX < cycle ) 191 printk("\n[ DBG] %s : thread %xenters / lba %x / buffer %x / cycle %d\n",192 __FUNCTION__ , this , lba, buffer, cycle );210 printk("\n[%s] thread[%x,%x] enters / lba %x / buffer %x / cycle %d\n", 211 __FUNCTION__ , this->process->pid, this->trdid, lba, buffer, cycle ); 193 212 #endif 194 213 … … 230 249 cycle = (uint32_t)hal_get_cycles(); 231 250 if( DEBUG_DEV_IOC_RX < cycle ) 232 printk("\n[ DBG] %s : thread %xexit / lba %x / buffer %x / cycle %d\n",233 __FUNCTION__ , this , lba, buffer, cycle );251 printk("\n[%s] thread[%x,%x] exit / lba %x / buffer %x / cycle %d\n", 252 __FUNCTION__ , this->process->pid, this->trdid, lba, buffer, cycle ); 234 253 #endif 235 254
Note: See TracChangeset
for help on using the changeset viewer.