- Timestamp:
- Aug 8, 2017, 11:17:28 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/x86_64/core/hal_context.c
r339 r342 75 75 if (thread->type == THREAD_USER) { 76 76 tf->tf_cs = GDT_FIXED_SEL(GDT_UCODE_SEL, SEL_UPL); 77 tf->tf_ss = GDT_FIXED_SEL(GDT_UDATA_SEL, SEL_UPL); 77 78 tf->tf_rsp = ((uint64_t)thread->u_stack_base) + 78 79 thread->u_stack_size; 79 80 } else { 80 81 tf->tf_cs = GDT_FIXED_SEL(GDT_KCODE_SEL, SEL_KPL); 82 tf->tf_ss = GDT_FIXED_SEL(GDT_KDATA_SEL, SEL_KPL); 81 83 tf->tf_rsp = kstacktop; 82 84 } … … 98 100 void hal_cpu_context_switch(thread_t *old, thread_t *new) 99 101 { 100 x86_panic((char *)__func__);102 curtls()->tls_thr = new; 101 103 102 104 /* Switch the VM space */
Note: See TracChangeset
for help on using the changeset viewer.