/*
- * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2016 Apple Computer, Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
#include <kern/task.h>
#include <mach/time_value.h>
-#include <kern/lock.h>
+#include <kern/locks.h>
+#include <kern/policy_internal.h>
#include <sys/systm.h> /* for unix_syscall_return() */
#include <libkern/OSAtomic.h>
extern void compute_averunnable(void *); /* XXX */
-
-
+__attribute__((noreturn))
static void
_sleep_continue( __unused void *parameter, wait_result_t wresult)
{
error = EWOULDBLOCK;
break;
case THREAD_AWAKENED:
+ case THREAD_RESTART:
/*
* Posix implies any signal should be delivered
* first, regardless of whether awakened due