+ struct thread *cur = thread_current ();
+ uint32_t *pd;
+
+ /* Destroy the current process's page directory and switch back
+ to the kernel-only page directory. We have to set
+ cur->pagedir to NULL before switching page directories, or a
+ timer interrupt might switch back to the process page
+ directory. */
+ pd = cur->pagedir;
+ if (pd != NULL)