]>
Commit | Line | Data |
---|---|---|
1c79356b A |
1 | /* |
2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
e5568f75 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 | * |
e5568f75 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, | |
e5568f75 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> | |
40 | #include <kern/thread_swap.h> | |
41 | #include <kern/host_statistics.h> | |
42 | #include <kern/misc_protos.h> | |
43 | #include <kern/assert.h> | |
44 | #include <mach/policy.h> | |
45 | ||
46 | #include <ipc/ipc_port.h> /* We use something from in here */ | |
47 | ||
1c79356b A |
48 | /* |
49 | * task_swappable: [exported] | |
50 | * | |
51 | * Make a task swappable or non-swappable. If made non-swappable, | |
52 | * it will be swapped in. | |
1c79356b A |
53 | */ |
54 | kern_return_t | |
55 | task_swappable( | |
56 | host_priv_t host_priv, | |
57 | task_t task, | |
58 | boolean_t make_swappable) | |
59 | { | |
60 | if (host_priv == HOST_PRIV_NULL) | |
55e303ae | 61 | return (KERN_INVALID_ARGUMENT); |
1c79356b A |
62 | |
63 | if (task == TASK_NULL) | |
55e303ae | 64 | return (KERN_INVALID_ARGUMENT); |
1c79356b | 65 | |
1c79356b | 66 | /* |
55e303ae | 67 | * We don't support swapping, this call is purely advisory. |
1c79356b | 68 | */ |
55e303ae | 69 | return (KERN_SUCCESS); |
1c79356b | 70 | } |