- Timestamp:
- Dec 3, 2018, 12:19:16 PM (6 years ago)
- Location:
- trunk/kernel/devices
- Files:
-
- 2 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 -
trunk/kernel/devices/dev_mmc.c
r565 r605 103 103 uint32_t cycle = (uint32_t)hal_get_cycles(); 104 104 if( DEBUG_DEV_MMC < cycle ) 105 printk("\n[ DBG] %s : thread %x enters / process %x / buf_xp = %l\n",106 __FUNCTION__, this , this->process->pid , buf_xp);105 printk("\n[%s] thread[%x,%x] enters / cluster %x / buffer %x\n", 106 __FUNCTION__, this->process->pid, this->trdid, GET_CXY(buf_xp), GET_PTR(buf_xp) ); 107 107 #endif 108 108 … … 126 126 cycle = (uint32_t)hal_get_cycles(); 127 127 if( DEBUG_DEV_MMC < cycle ) 128 printk("\n[ DBG] %s : thread %x exit / process %x / buf_xp = %l\n",129 __FUNCTION__, this , this->process->pid , buf_xp);128 printk("\n[%s] thread[%x,%x] exit / cluster %x / buffer %x\n", 129 __FUNCTION__, this->process->pid, this->trdid, GET_CXY(buf_xp), GET_PTR(buf_xp) ); 130 130 #endif 131 131 … … 144 144 uint32_t cycle = (uint32_t)hal_get_cycles(); 145 145 if( DEBUG_DEV_MMC < cycle ) 146 printk("\n[ DBG] %s : thread %x enters / process %x / buf_xp = %l\n",147 __FUNCTION__, this , this->process->pid , buf_xp);146 printk("\n[%s] thread[%x,%x] enters / cluster %x / buffer %x\n", 147 __FUNCTION__, this->process->pid, this->trdid, GET_CXY(buf_xp), GET_PTR(buf_xp) ); 148 148 #endif 149 149 … … 167 167 cycle = (uint32_t)hal_get_cycles(); 168 168 if( DEBUG_DEV_MMC < cycle ) 169 printk("\n[ DBG] %s : thread %x exit / process %x / buf_xp = %l\n",170 __FUNCTION__, this , this->process->pid , buf_xp);169 printk("\n[%s] thread[%x,%x] exit / cluster %x / buffer %x\n", 170 __FUNCTION__, this->process->pid, this->trdid, GET_CXY(buf_xp), GET_PTR(buf_xp) ); 171 171 #endif 172 172
Note: See TracChangeset
for help on using the changeset viewer.