Prettify scheduling queue prints
This commit is contained in:
		
							parent
							
								
									31042a5a05
								
							
						
					
					
						commit
						b924ce0726
					
				| @ -212,7 +212,6 @@ PUBLIC void image_dmp() | |||||||
| PUBLIC void sched_dmp() | PUBLIC void sched_dmp() | ||||||
| { | { | ||||||
|   struct proc *rdy_head[NR_SCHED_QUEUES]; |   struct proc *rdy_head[NR_SCHED_QUEUES]; | ||||||
|   char *types[] = {"task","higher","high","normal","low","lower","user","idle"}; |  | ||||||
|   struct kinfo kinfo; |   struct kinfo kinfo; | ||||||
|   register struct proc *rp; |   register struct proc *rp; | ||||||
|   vir_bytes ptr_diff; |   vir_bytes ptr_diff; | ||||||
| @ -244,13 +243,14 @@ PUBLIC void sched_dmp() | |||||||
|   printf("Dumping scheduling queues.\n"); |   printf("Dumping scheduling queues.\n"); | ||||||
| 
 | 
 | ||||||
|   for (r=0;r<NR_SCHED_QUEUES; r++) { |   for (r=0;r<NR_SCHED_QUEUES; r++) { | ||||||
|       printf("* %6s: ", types[r]); |  | ||||||
|       rp = rdy_head[r]; |       rp = rdy_head[r]; | ||||||
|  |       if(!rp) continue; | ||||||
|  |       printf("%2d: ", r); | ||||||
|       while (rp != NIL_PROC) { |       while (rp != NIL_PROC) { | ||||||
|           printf("%3d, ", rp->p_nr); |           printf("%3d ", rp->p_nr); | ||||||
|           rp = rp->p_nextready; |           rp = rp->p_nextready; | ||||||
|       } |       } | ||||||
|       printf("NIL\n"); |       printf("\n"); | ||||||
|   } |   } | ||||||
|   printf("\n"); |   printf("\n"); | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Ben Gras
						Ben Gras