@@ -137,32 +137,32 @@ static void task_init(unsigned short task_id,
137
137
}
138
138
139
139
/* Setup task_id */
140
- task_list [task_id ].task_id = task_id ;
140
+ task_instance_table [task_id ].task_id = task_id ;
141
141
142
142
/* Setup context switch function */
143
- copy_mem (context_switch_template , task_list [task_id ].context_switch_func , CONTEXT_SWITCH_FN_SIZE );
144
- task_list [task_id ].context_switch_func [CONTEXT_SWITCH_FN_TSKNO_FIELD ] = 8 * (task_id - 1 ) + 0x20 ;
145
- task_list [task_id ].context_switch = (void (* )(void ))task_list [task_id ].context_switch_func ;
143
+ copy_mem (context_switch_template , task_instance_table [task_id ].context_switch_func , CONTEXT_SWITCH_FN_SIZE );
144
+ task_instance_table [task_id ].context_switch_func [CONTEXT_SWITCH_FN_TSKNO_FIELD ] = 8 * (task_id - 1 ) + 0x20 ;
145
+ task_instance_table [task_id ].context_switch = (void (* )(void ))task_instance_table [task_id ].context_switch_func ;
146
146
147
147
/* Setup GDT for task_tss */
148
- init_gdt (task_id + GDT_IDX_OFS , (unsigned int )& task_list [task_id ].tss , sizeof (struct tss ), 3 );
148
+ init_gdt (task_id + GDT_IDX_OFS , (unsigned int )& task_instance_table [task_id ].tss , sizeof (struct tss ), 3 );
149
149
150
150
/* Setup task_tss */
151
- task_list [task_id ].tss .eip = APP_ENTRY_POINT ;
152
- task_list [task_id ].tss .esp = 0x20001800 ;
153
- task_list [task_id ].tss .eflags = 0x00000200 ;
154
- task_list [task_id ].tss .esp0 = APP_STACK_BASE ;
155
- task_list [task_id ].tss .ss0 = 0x0010 ;
156
- task_list [task_id ].tss .es = 0x0038 | 0x0003 ;
157
- task_list [task_id ].tss .cs = 0x0030 | 0x0003 ;
158
- task_list [task_id ].tss .ss = 0x0038 | 0x0003 ;
159
- task_list [task_id ].tss .ds = 0x0038 | 0x0003 ;
160
- task_list [task_id ].tss .fs = 0x0038 | 0x0003 ;
161
- task_list [task_id ].tss .gs = 0x0038 | 0x0003 ;
162
- task_list [task_id ].tss .__cr3 = (unsigned int )pd_base_addr | 0x18 ;
151
+ task_instance_table [task_id ].tss .eip = APP_ENTRY_POINT ;
152
+ task_instance_table [task_id ].tss .esp = 0x20001800 ;
153
+ task_instance_table [task_id ].tss .eflags = 0x00000200 ;
154
+ task_instance_table [task_id ].tss .esp0 = APP_STACK_BASE ;
155
+ task_instance_table [task_id ].tss .ss0 = 0x0010 ;
156
+ task_instance_table [task_id ].tss .es = 0x0038 | 0x0003 ;
157
+ task_instance_table [task_id ].tss .cs = 0x0030 | 0x0003 ;
158
+ task_instance_table [task_id ].tss .ss = 0x0038 | 0x0003 ;
159
+ task_instance_table [task_id ].tss .ds = 0x0038 | 0x0003 ;
160
+ task_instance_table [task_id ].tss .fs = 0x0038 | 0x0003 ;
161
+ task_instance_table [task_id ].tss .gs = 0x0038 | 0x0003 ;
162
+ task_instance_table [task_id ].tss .__cr3 = (unsigned int )pd_base_addr | 0x18 ;
163
163
164
164
/* Add task to run_queue */
165
- sched_runq_enq (& task_list [task_id ]);
165
+ sched_runq_enq (& task_instance_table [task_id ]);
166
166
}
167
167
168
168
int main (void )
0 commit comments