> - else if (thread == current_thread()) { > - struct x86_desc template = {0, 0, 0, ACC_P, 0, 0 ,0}; > + else { > + struct real_descriptor template = {0, 0, 0, ACC_P, 0, 0 ,0};
This can't be right (changing the if). > - for (idx = sel_idx (USER_GDT); idx < sel_idx (USER_GDT) + > USER_GDT_SLOTS; These changes are cosmetic, though I don't know why he didn't follow the old code. > [i386_get_gdt] > if ((selector & (SEL_LDT|SEL_PL)) != SEL_PL_U > - || sel_idx (selector) < USER_GDT > - || sel_idx (selector) >= USER_GDT + USER_GDT_SLOTS) > + || sel_idx (selector) < sel_idx(USER_GDT) > + || sel_idx (selector) >= sel_idx(USER_GDT) + USER_GDT_SLOTS) > return KERN_INVALID_ARGUMENT; That's probably fixing a bug in the old code. > - *desc = thread->pcb->ims.user_gdt[sel_idx (selector)]; > + *desc = thread->pcb->ims.user_gdt[sel_idx (selector) - sel_idx(USER_GDT)]; This too. _______________________________________________ Bug-hurd mailing list Bug-hurd@gnu.org http://lists.gnu.org/mailman/listinfo/bug-hurd