1 /*
2 * Mach Operating System
3 * Copyright (c) 1993,1992,1991,1990,1989 Carnegie Mellon University
4 * All Rights Reserved.
5 *
6 * Permission to use, copy, modify and distribute this software and its
7 * documentation is hereby granted, provided that both the copyright
8 * notice and this permission notice appear in all copies of the
9 * software, derivative works or modified versions, and any portions
10 * thereof, and that both notices appear in supporting documentation.
11 *
12 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15 *
16 * Carnegie Mellon requests users of this software to return to
17 *
18 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 * School of Computer Science
20 * Carnegie Mellon University
21 * Pittsburgh PA 15213-3890
22 *
23 * any improvements or extensions that they make and grant Carnegie Mellon
24 * the rights to redistribute these changes.
25 */
26 /*
27 * HISTORY
28 * $Log: thread_switch.h,v $
29 * Revision 2.6 93/11/17 17:47:58 dbg
30 * Added SWITCH_OPTION_IDLE to leave thread at depressed priority
31 * after thread_switch call.
32 * [93/07/16 dbg]
33 *
34 * Revision 2.5 93/01/14 17:48:14 danner
35 * Standardized include symbol usage.
36 * [92/06/10 pds]
37 *
38 * Revision 2.4 91/05/14 17:01:33 mrt
39 * Correcting copyright
40 *
41 * Revision 2.3 91/02/05 17:36:45 mrt
42 * Changed to new Mach copyright
43 * [91/02/01 17:22:02 mrt]
44 *
45 * Revision 2.2 90/06/02 15:00:19 rpd
46 * Created for new host/processor technology.
47 * [90/03/26 23:51:49 rpd]
48 *
49 * Merge to X96
50 * [89/08/02 23:12:52 dlb]
51 *
52 * Created.
53 * [89/07/25 19:05:41 dlb]
54 *
55 * Revision 2.3 89/10/15 02:06:04 rpd
56 * Minor cleanups.
57 *
58 * Revision 2.2 89/10/11 14:41:47 dlb
59 * Merge.
60 * [89/09/01 17:57:58 dlb]
61 *
62 */
63
64 #ifndef _MACH_THREAD_SWITCH_H_
65 #define _MACH_THREAD_SWITCH_H_
66
67 /*
68 * Constant definitions for thread_switch trap.
69 */
70
71 #define SWITCH_OPTION_NONE 0 /* no change to current thread */
72 #define SWITCH_OPTION_DEPRESS 1 /* drop to depressed priority for
73 specified time and restore
74 current priority when awakened,
75 or when no other threads can
76 run */
77 #define SWITCH_OPTION_WAIT 2 /* sleep for specified time */
78 #define SWITCH_OPTION_IDLE 3 /* drop to depressed priority for
79 specified time, and restore
80 current priority when time
81 expires. If there are no other
82 threads to run, run at depressed
83 priority. */
84
85 #define valid_switch_option(opt) ((0 <= (opt)) && ((opt) <= 3))
86
87 #endif /* _MACH_THREAD_SWITCH_H_ */
Cache object: 7960d39fc4b7a2bfd8fbb5c8542f87fc
|