Changeset 580 for trunk/kernel/syscalls
- Timestamp:
- Oct 8, 2018, 11:31:42 AM (6 years ago)
- Location:
- trunk/kernel/syscalls
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/shared_include/shared_almos.h
r445 r580 51 51 DISPLAY_TXT_PROCESSES = 6, 52 52 DISPLAY_DQDT = 7, 53 DISPLAY_BUSYLOCKS = 8, 53 54 } 54 55 display_type_t; -
trunk/kernel/syscalls/sys_display.c
r506 r580 48 48 else if( type == DISPLAY_CHDEV ) return "CHDEV"; 49 49 else if( type == DISPLAY_TXT_PROCESSES ) return "TXT_PROCESSES"; 50 else if( type == DISPLAY_DQDT ) return "DQDT"; 51 else if( type == DISPLAY_BUSYLOCKS ) return "BUSYLOCKS"; 50 52 } 51 53 #endif … … 87 89 88 90 #if DEBUG_SYSCALLS_ERROR 89 printk("\n[ERROR] in %s : string buffer %x unmapped / thread %x / process %x\n",90 __FUNCTION__ , (intptr_t)arg0 , this->trdid , process->pid);91 printk("\n[ERROR] in %s for STRING : string buffer %x unmapped\n", 92 __FUNCTION__ , (intptr_t)arg0 ); 91 93 #endif 92 94 this->errno = EINVAL; … … 101 103 102 104 #if DEBUG_SYSCALLS_ERROR 103 printk("\n[ERROR] in %s : string length %d too large / thread %x / process %x\n",104 __FUNCTION__ , length , this->trdid , process->pid);105 printk("\n[ERROR] in %s for STRING : string length %d too large\n", 106 __FUNCTION__ , length ); 105 107 #endif 106 108 this->errno = EINVAL; … … 125 127 126 128 #if DEBUG_SYSCALLS_ERROR 127 printk("\n[ERROR] in %s : illegal cxy argument %x / thread %x / process %x\n",128 __FUNCTION__ , cxy , this->trdid , process->pid);129 printk("\n[ERROR] in %s for VMM : process %x in cluster %x not found\n", 130 __FUNCTION__ , pid , cxy ); 129 131 #endif 130 132 this->errno = EINVAL; … … 139 141 140 142 #if DEBUG_SYSCALLS_ERROR 141 printk("\n[ERROR] in %s : process %x in cluster %x not found / thread %x / process %x\n",142 __FUNCTION__ , pid , cxy , this->trdid , process->pid);143 printk("\n[ERROR] in %s for VMM : process %x in cluster %x not found\n", 144 __FUNCTION__ , pid , cxy ); 143 145 #endif 144 146 this->errno = EINVAL; … … 170 172 171 173 #if DEBUG_SYSCALLS_ERROR 172 printk("\n[ERROR] in %s : illegal cxy argument %x / thread %x / process%x\n",173 __FUNCTION__ , cxy , this->trdid , process->pid);174 printk("\n[ERROR] in %s for SCHED : illegal cxy argument %x\n", 175 __FUNCTION__ , cxy ); 174 176 #endif 175 177 this->errno = EINVAL; … … 182 184 183 185 #if DEBUG_SYSCALLS_ERROR 184 printk("\n[ERROR] in %s : illegal lid argument %x / thread %x / process%x\n",185 __FUNCTION__ , lid , this->trdid , process->pid);186 printk("\n[ERROR] in %s for SCHED : illegal lid argument %x\n", 187 __FUNCTION__ , lid ); 186 188 #endif 187 189 this->errno = EINVAL; … … 208 210 209 211 #if DEBUG_SYSCALLS_ERROR 210 printk("\n[ERROR] in %s : illegal cxy argument %x / thread %x / process%x\n",211 __FUNCTION__ , cxy , this->trdid , process->pid);212 printk("\n[ERROR] in %s for CLUSTER_PROCESSES : illegal cxy argument %x\n", 213 __FUNCTION__ , cxy ); 212 214 #endif 213 215 this->errno = EINVAL; … … 216 218 217 219 cluster_processes_display( cxy ); 220 } 221 ////////////////////////////// 222 else if( type == DISPLAY_VFS ) 223 { 224 vfs_display( process->vfs_root_xp ); 225 } 226 //////////////////////////////// 227 else if( type == DISPLAY_CHDEV ) 228 { 229 chdev_dir_display(); 218 230 } 219 231 //////////////////////////////////////// … … 227 239 228 240 #if DEBUG_SYSCALLS_ERROR 229 printk("\n[ERROR] in %s : illegal txt_id argument %d / thread %x / process %x\n",230 __FUNCTION__ , txt_id , this->trdid , process->pid);241 printk("\n[ERROR] in %s for TXT_PROCESSES : illegal txt_id argument %d\n", 242 __FUNCTION__ , txt_id ); 231 243 #endif 232 244 this->errno = EINVAL; … … 236 248 process_txt_display( txt_id ); 237 249 } 238 ////////////////////////////// 239 else if( type == DISPLAY_VFS ) 240 { 241 vfs_display( process->vfs_root_xp ); 242 } 243 //////////////////////////////// 244 else if( type == DISPLAY_CHDEV ) 245 { 246 chdev_dir_display(); 247 } 248 //////////////////////////////// 250 /////////////////////////////// 249 251 else if( type == DISPLAY_DQDT ) 250 252 { 251 253 dqdt_display(); 254 } 255 //////////////////////////////////// 256 else if( type == DISPLAY_BUSYLOCKS ) 257 { 258 pid_t pid = (cxy_t)arg0; 259 trdid_t trdid = (trdid_t)arg1; 260 261 // get extended pointer on target thread 262 xptr_t thread_xp = thread_get_xptr( pid , trdid ); 263 264 if( thread_xp == XPTR_NULL ) 265 { 266 267 #if DEBUG_SYSCALLS_ERROR 268 printk("\n[ERROR] in %s for BUSYLOCKS : thread %x in process %x not found\n", 269 __FUNCTION__ , trdid , pid ); 270 #endif 271 this->errno = EINVAL; 272 return -1; 273 } 274 275 thread_display_busylocks( thread_xp ); 252 276 } 253 277 //// … … 256 280 257 281 #if DEBUG_SYSCALLS_ERROR 258 printk("\n[ERROR] in %s : undefined display type % x / thread %x / process %x\n",259 __FUNCTION__ , type , this->trdid , process->pid);282 printk("\n[ERROR] in %s : undefined display type %d\n", 283 __FUNCTION__ , type ); 260 284 #endif 261 285 this->errno = EINVAL;
Note: See TracChangeset
for help on using the changeset viewer.