]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/kern/syscall_subr.c
xnu-1486.2.11.tar.gz
[apple/xnu.git] / osfmk / kern / syscall_subr.c
index 15af1fa7e03aebd2c754100423de7d9c4ed8070a..3daf1ec3874eccb8884bcb60508ff74ba14ffe8b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2008 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2009 Apple Inc. All rights reserved.
  *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  * 
 #include <mach/mach_host_server.h>
 #include <mach/mach_syscalls.h>
 
+
+#ifdef MACH_BSD
+extern void workqueue_thread_yielded(void);
+#endif /* MACH_BSD */
+
+
+/* Called from commpage to take a delayed preemption when exiting
+ * the "Preemption Free Zone" (PFZ).
+ */
+kern_return_t
+pfz_exit(
+__unused       struct pfz_exit_args *args)
+{
+       /* For now, nothing special to do.  We'll pick up the ASTs on kernel exit. */
+
+       return (KERN_SUCCESS);
+}
+
+
 /*
  *     swtch and swtch_pri both attempt to context switch (logic in
  *     thread_block no-ops the context switch if nothing would happen).
@@ -221,6 +240,8 @@ thread_switch(
            return (KERN_INVALID_ARGUMENT);
     }
 
+    workqueue_thread_yielded();
+
        /*
         * Translate the port name if supplied.
         */