]>
Commit | Line | Data |
---|---|---|
1c79356b | 1 | /* |
91447636 | 2 | * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. |
1c79356b A |
3 | * |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
37839358 A |
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. | |
1c79356b | 11 | * |
37839358 A |
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 | |
1c79356b A |
14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
37839358 A |
16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the |
17 | * License for the specific language governing rights and limitations | |
18 | * under the License. | |
1c79356b A |
19 | * |
20 | * @APPLE_LICENSE_HEADER_END@ | |
21 | */ | |
22 | /* | |
23 | * @OSF_COPYRIGHT@ | |
24 | */ | |
25 | /* | |
26 | * File: kern/task_swap.c | |
27 | * | |
28 | * Task residency management primitives implementation. | |
29 | */ | |
30 | #include <mach_assert.h> | |
31 | #include <task_swapper.h> | |
32 | ||
33 | #include <kern/spl.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> | |
1c79356b A |
40 | #include <kern/host_statistics.h> |
41 | #include <kern/misc_protos.h> | |
42 | #include <kern/assert.h> | |
43 | #include <mach/policy.h> | |
44 | ||
45 | #include <ipc/ipc_port.h> /* We use something from in here */ | |
46 | ||
1c79356b A |
47 | /* |
48 | * task_swappable: [exported] | |
49 | * | |
50 | * Make a task swappable or non-swappable. If made non-swappable, | |
51 | * it will be swapped in. | |
1c79356b A |
52 | */ |
53 | kern_return_t | |
54 | task_swappable( | |
55 | host_priv_t host_priv, | |
56 | task_t task, | |
91447636 | 57 | __unused boolean_t make_swappable) |
1c79356b A |
58 | { |
59 | if (host_priv == HOST_PRIV_NULL) | |
55e303ae | 60 | return (KERN_INVALID_ARGUMENT); |
1c79356b A |
61 | |
62 | if (task == TASK_NULL) | |
55e303ae | 63 | return (KERN_INVALID_ARGUMENT); |
1c79356b | 64 | |
1c79356b | 65 | /* |
55e303ae | 66 | * We don't support swapping, this call is purely advisory. |
1c79356b | 67 | */ |
55e303ae | 68 | return (KERN_SUCCESS); |
1c79356b | 69 | } |