Changeset 275 for soft/giet_vm/giet_kernel/ctx_handler.c
- Timestamp:
- Jan 21, 2014, 7:20:06 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_kernel/ctx_handler.c
r271 r275 108 108 if (curr_task_id != next_task_id) 109 109 { 110 #if GIET_DEBUG_SWITCH 111 _tty_get_lock( 0 ); 112 _puts("\n[GIET DEBUG] Context switch for processor "); 113 _putd(_get_procid()); 114 _puts(" at cycle "); 115 _putd(_get_proctime()); 116 _puts("\n"); 117 _puts(" - tasks = "); 118 _putd(tasks); 119 _puts("\n"); 120 _puts(" - curr_task_id = "); 121 _putd( curr_task_id ); 122 _puts("\n"); 123 _puts(" - next_task_id = "); 124 _putd(next_task_id); 125 _puts("\n"); 126 _tty_release_lock( 0 ); 127 #endif 128 110 129 unsigned int* curr_ctx_vaddr = &(psched->context[curr_task_id][0]); 111 130 unsigned int* next_ctx_vaddr = &(psched->context[next_task_id][0]); … … 113 132 unsigned int local_id = procid % NB_PROCS_MAX; 114 133 unsigned int cluster_id = procid / NB_PROCS_MAX; 115 116 // set current task index117 psched->current = next_task_id;118 134 119 135 // reset timer counter … … 124 140 #endif 125 141 142 // set current task index 143 psched->current = next_task_id; 144 126 145 // makes context switch 127 146 _task_switch(curr_ctx_vaddr, next_ctx_vaddr); 128 129 #if GIET_DEBUG_SWITCH130 _tty_get_lock( 0 );131 _puts("\n[GIET DEBUG] Context switch for processor ");132 _putd(_get_procid());133 _puts(" at cycle ");134 _putd(_get_proctime());135 _puts("\n");136 _puts(" - tasks = ");137 _putd(tasks);138 _puts("\n");139 _puts(" - curr_task_id = ");140 _putd( curr_task_id );141 _puts("\n");142 _puts(" - next_task_id = ");143 _putd(next_task_id);144 _puts("\n");145 _tty_release_lock( 0 );146 #endif147 148 147 } 149 148 } //end _ctx_switch() … … 157 156 while(1) 158 157 { 158 #if GIET_IDLE_TASK_VERBOSITY == 1 159 _tty_get_lock( 0 ); 160 _puts("\n[GIET WARNING] Processor "); 161 _putd(_get_procid()); 162 _puts(" idle at cycle "); 163 _putd(_get_proctime()); 164 _puts("\n"); 165 _tty_release_lock( 0 ); 166 #endif 167 159 168 asm volatile( 160 169 "move $3, %0 \n" … … 167 176 : "$3" ); 168 177 169 #if GIET_IDLE_TASK_VERBOSITY == 1170 _tty_get_lock( 0 );171 _puts("\n[GIET WARNING] Processor ");172 _putd(_get_procid());173 _puts(" idle at cycle ");174 _putd(_get_proctime());175 _puts("\n");176 _tty_release_lock( 0 );177 #endif178 179 178 count = GIET_IDLE_TASK_PERIOD; 180 179 }
Note: See TracChangeset
for help on using the changeset viewer.