Skip to content
Snippets Groups Projects
Commit 28fef27f authored by gback's avatar gback
Browse files

ensure tss_get() is called with preemption disabled

otherwise, CPU-specific information may be stale by the time
tss_get returns.  Note that tss_get() is currently unused.
parent 54d6e5c2
No related branches found
No related tags found
No related merge requests found
......@@ -73,14 +73,13 @@ tss_init (void)
tss->esp0 = (uint8_t *) thread_current () + PGSIZE;
}
/* Returns the kernel TSS. */
/* Returns the kernel TSS on the current CPU. */
struct tss *
tss_get (void)
{
intr_disable_push ();
ASSERT (intr_get_level () == INTR_OFF);
struct tss *tss = &get_cpu ()->ts;
ASSERT (tss != NULL);
intr_enable_pop ();
return tss;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment