Changeset 469 for trunk/kernel/syscalls
- Timestamp:
- Aug 20, 2018, 1:04:16 PM (6 years ago)
- Location:
- trunk/kernel/syscalls
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_read.c
r459 r469 231 231 tm_end = hal_get_cycles(); 232 232 if( DEBUG_SYS_READ < tm_end ) 233 printk("\n[DBG] %s : thread %x in process %x exit / cycle %d\n" 234 "nbytes %d / file_id %d / cost %d\n", 235 __FUNCTION__ , this->trdid, process->pid, 236 (uint32_t)tm_start , nbytes , file_id , (uint32_t)(tm_end - tm_start) ); 233 printk("\n[DBG] %s : thread %x in process %x exit / cycle %d / cost %d\n", 234 __FUNCTION__ , this->trdid, process->pid, (uint32_t)tm_start, (uint32_t)(tm_end - tm_start) ); 237 235 #endif 238 236 -
trunk/kernel/syscalls/sys_sem.c
r457 r469 74 74 75 75 #if DEBUG_SYSCALLS_ERROR 76 printk("\n[ERROR] in %s : unmapped semaphore pointer %x / thread %x in process %x \n",77 __FUNCTION__ , (intptr_t)vaddr, this->trdid, process->pid );76 printk("\n[ERROR] in %s : unmapped semaphore pointer %x / thread %x in process %x / cycle %d\n", 77 __FUNCTION__ , (intptr_t)vaddr, this->trdid, process->pid, (uint32_t)hal_get_cycles() ); 78 78 vmm_display( process , false ); 79 79 #endif … … 97 97 98 98 #if DEBUG_SYSCALLS_ERROR 99 printk("\n[ERROR] in %s : cannot create semaphore / thread %x in process %x\n",100 __FUNCTION__, this->trdid, process->pid );99 printk("\n[ERROR] in %s INIT: cannot create semaphore / thread %x in process %x / cycle %d\n", 100 __FUNCTION__, this->trdid, process->pid, (uint32_t)hal_get_cycles() ); 101 101 #endif 102 102 this->errno = ENOMEM; … … 115 115 116 116 #if DEBUG_SYSCALLS_ERROR 117 printk("\n[ERROR] in %s : unmapped buffer for current value %x / thread %x in process %x\n",118 __FUNCTION__ , (intptr_t)current_value, this->trdid, process->pid );117 printk("\n[ERROR] in %s GETVALUE: unmapped target buffer %x / thread %x in process %x / cycle %d\n", 118 __FUNCTION__ , (intptr_t)current_value, this->trdid, process->pid, (uint32_t)hal_get_cycles() ); 119 119 vmm_display( process , false ); 120 120 #endif … … 131 131 132 132 #if DEBUG_SYSCALLS_ERROR 133 printk("\n[ERROR] in %s : semaphore %x not registered / thread %x in process %x\n",134 __FUNCTION__ , (intptr_t)vaddr, this->trdid, process->pid );133 printk("\n[ERROR] in %s GETVALUE: semaphore %x not found / thread %x in process %x / cycle %d\n", 134 __FUNCTION__ , (intptr_t)vaddr, this->trdid, process->pid, (uint32_t)hal_get_cycles() ); 135 135 #endif 136 136 this->errno = EINVAL; … … 157 157 158 158 #if DEBUG_SYSCALLS_ERROR 159 printk("\n[ERROR] in %s : semaphore %x not registered / thread %x in process %x\n", 160 __FUNCTION__ , (intptr_t)vaddr, this->trdid, process->pid ); 159 printk("\n[ERROR] in %s WAIT: semaphore %x not found / thread %x in process %x / cycle %d\n", 160 __FUNCTION__ , (intptr_t)vaddr, this->trdid, process->pid, (uint32_t)hal_get_cycles() ); 161 vmm_display( process , true ); 161 162 #endif 162 163 this->errno = EINVAL; … … 180 181 181 182 #if DEBUG_SYSCALLS_ERROR 182 printk("\n[ERROR] in %s : semaphore %x not registered / thread %x in process %x\n",183 __FUNCTION__ , (intptr_t)vaddr, this->trdid, process->pid );183 printk("\n[ERROR] in %s POST: semaphore %x not found / thread %x in process %x / cycle %d\n", 184 __FUNCTION__ , (intptr_t)vaddr, this->trdid, process->pid, (uint32_t)hal_get_cycles() ); 184 185 #endif 185 186 this->errno = EINVAL; … … 203 204 204 205 #if DEBUG_SYSCALLS_ERROR 205 printk("\n[ERROR] in %s : semaphore %x not registered / thread %x in process %x\n",206 __FUNCTION__ , (intptr_t)vaddr, this->trdid, process->pid );206 printk("\n[ERROR] in %s DESTROY: semaphore %x not found / thread %x in process %x / cycle %d\n", 207 __FUNCTION__ , (intptr_t)vaddr, this->trdid, process->pid, (uint32_t)hal_get_cycles() ); 207 208 #endif 208 209 this->errno = EINVAL; … … 220 221 221 222 #if DEBUG_SYSCALLS_ERROR 222 printk("\n[ERROR] in %s : undefined operation type %d / thread %x in process %x \n",223 __FUNCTION__ , operation, this->trdid, process->pid );223 printk("\n[ERROR] in %s : undefined operation type %d / thread %x in process %x / cycle %d\n", 224 __FUNCTION__ , operation, this->trdid, process->pid, (uint32_t)hal_get_cycles() ); 224 225 #endif 225 226 this->errno = EINVAL; -
trunk/kernel/syscalls/sys_write.c
r459 r469 61 61 reg_t save_sr; // required to enable IRQs during syscall 62 62 63 #if (DEBUG_SYS_WRITE & 1)64 enter_sys_write = (uint32_t)tm_start;65 #endif66 67 63 thread_t * this = CURRENT_THREAD; 68 64 process_t * process = this->process; … … 77 73 #endif 78 74 75 #if (DEBUG_SYS_WRITE & 1) 76 enter_sys_write = (uint32_t)tm_start; 77 #endif 78 79 79 // check file_id argument 80 80 if( file_id >= CONFIG_PROCESS_FILE_MAX_NR ) … … 195 195 tm_end = hal_get_cycles(); 196 196 if( DEBUG_SYS_WRITE < tm_end ) 197 printk("\n[DBG] %s : thread %x in process %x exit / cycle %d\n" 198 "nbytes %d / file_id %d / cost %d\n", 199 __FUNCTION__, this->trdid, process->pid, (uint32_t)tm_start, 200 nbytes, file_id , (uint32_t)(tm_end - tm_start) ); 197 printk("\n[DBG] %s : thread %x in process %x exit / cycle %d / cost %d\n", 198 __FUNCTION__, this->trdid, process->pid, (uint32_t)tm_start, (uint32_t)(tm_end - tm_start) ); 201 199 #endif 202 200
Note: See TracChangeset
for help on using the changeset viewer.