From: Ben Pfaff Date: Wed, 1 Sep 2004 22:55:29 +0000 (+0000) Subject: Only call addrspace_destroy() if USERPROG. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pintos-anon;a=commitdiff_plain;h=c9d103e3fc1f398acb10bbaa66bf5a61318d26e9 Only call addrspace_destroy() if USERPROG. --- diff --git a/src/threads/thread.c b/src/threads/thread.c index e31d838..c9bc8ee 100644 --- a/src/threads/thread.c +++ b/src/threads/thread.c @@ -337,7 +337,9 @@ destroy_thread (struct thread *t) ASSERT (t->status == THREAD_DYING); ASSERT (t != thread_current ()); +#ifdef USERPROG addrspace_destroy (t); +#endif palloc_free (t); }