X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/3903760236c30e3b5ace7a4eefac3a269d68957c..813fb2f63a553c957e917ede5f119b021d6ce391:/osfmk/kern/bsd_kern.c?ds=inline diff --git a/osfmk/kern/bsd_kern.c b/osfmk/kern/bsd_kern.c index 69aaa1ceb..e9e601433 100644 --- a/osfmk/kern/bsd_kern.c +++ b/osfmk/kern/bsd_kern.c @@ -49,7 +49,6 @@ /* BSD KERN COMPONENT INTERFACE */ -task_t bsd_init_task = TASK_NULL; extern unsigned int not_in_kdp; /* Skip acquiring locks if we're in kdp */ thread_t get_firstthread(task_t); @@ -308,12 +307,13 @@ int is_64signalregset(void) /* * Swap in a new map for the task/thread pair; the old map reference is - * returned. + * returned. Also does a pmap switch if thread provided is current thread. */ vm_map_t -swap_task_map(task_t task, thread_t thread, vm_map_t map, boolean_t doswitch) +swap_task_map(task_t task, thread_t thread, vm_map_t map) { vm_map_t old_map; + boolean_t doswitch = (thread == current_thread()) ? TRUE : FALSE; if (task != thread->task) panic("swap_task_map");