2 * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
26 * File: kern/task_swap.c
28 * Task residency management primitives implementation.
30 #include <mach_assert.h>
31 #include <task_swapper.h>
34 #include <kern/lock.h>
35 #include <kern/queue.h>
36 #include <kern/host.h>
37 #include <kern/task.h>
38 #include <kern/task_swap.h>
39 #include <kern/thread.h>
40 #include <kern/host_statistics.h>
41 #include <kern/misc_protos.h>
42 #include <kern/assert.h>
43 #include <mach/policy.h>
45 #include <ipc/ipc_port.h> /* We use something from in here */
48 * task_swappable: [exported]
50 * Make a task swappable or non-swappable. If made non-swappable,
51 * it will be swapped in.
55 host_priv_t host_priv
,
57 __unused boolean_t make_swappable
)
59 if (host_priv
== HOST_PRIV_NULL
)
60 return (KERN_INVALID_ARGUMENT
);
62 if (task
== TASK_NULL
)
63 return (KERN_INVALID_ARGUMENT
);
66 * We don't support swapping, this call is purely advisory.
68 return (KERN_SUCCESS
);