1 /* 2 * Copyright 1991-1998 by Open Software Foundation, Inc. 3 * All Rights Reserved 4 * 5 * Permission to use, copy, modify, and distribute this software and 6 * its documentation for any purpose and without fee is hereby granted, 7 * provided that the above copyright notice appears in all copies and 8 * that both the copyright notice and this permission notice appear in 9 * supporting documentation. 10 * 11 * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE 12 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 13 * FOR A PARTICULAR PURPOSE. 14 * 15 * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR 16 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 17 * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT, 18 * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 19 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 20 */ 21 /* 22 * MkLinux 23 */ 24 /* CMU_HIST */ 25 /* 26 * Revision 2.3 91/05/14 17:01:22 mrt 27 * Correcting copyright 28 * 29 * Revision 2.2 91/02/05 17:36:42 mrt 30 * Changed to new Mach copyright 31 * [91/02/01 17:21:56 mrt] 32 * 33 * Revision 2.1 89/08/03 16:06:18 rwd 34 * Created. 35 * 36 * Revision 2.4 89/02/25 18:41:29 gm0w 37 * Changes for cleanup. 38 * 39 * Revision 2.3 89/02/07 00:53:47 mwyoung 40 * Relocated from mach/thread_status.h 41 * 42 * Revision 2.2 88/08/25 18:21:12 mwyoung 43 * Adjusted include file references. 44 * [88/08/16 04:16:13 mwyoung] 45 * 46 * Add THREAD_STATE_FLAVOR_LIST; remove old stuff. 47 * [88/08/11 18:49:48 mwyoung] 48 * 49 * 50 * 15-Jan-88 David Golub (dbg) at Carnegie-Mellon University 51 * Replaced with variable-length array for flexibile interface. 52 * 53 * 28-Apr-87 Avadis Tevanian (avie) at Carnegie-Mellon University 54 * Latest hacks to keep MiG happy wrt refarrays. 55 * 56 * 27-Mar-87 Avadis Tevanian (avie) at Carnegie-Mellon University 57 * Created. 58 * 59 */ 60 /* CMU_ENDHIST */ 61 /* 62 * Mach Operating System 63 * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University 64 * All Rights Reserved. 65 * 66 * Permission to use, copy, modify and distribute this software and its 67 * documentation is hereby granted, provided that both the copyright 68 * notice and this permission notice appear in all copies of the 69 * software, derivative works or modified versions, and any portions 70 * thereof, and that both notices appear in supporting documentation. 71 * 72 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 73 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 74 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 75 * 76 * Carnegie Mellon requests users of this software to return to 77 * 78 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 79 * School of Computer Science 80 * Carnegie Mellon University 81 * Pittsburgh PA 15213-3890 82 * 83 * any improvements or extensions that they make and grant Carnegie Mellon 84 * the rights to redistribute these changes. 85 */ 86 /* 87 */ 88 /* 89 * File: mach/thread_status.h 90 * Author: Avadis Tevanian, Jr. 91 * 92 * This file contains the structure definitions for the user-visible 93 * thread state. This thread state is examined with the thread_get_state 94 * kernel call and may be changed with the thread_set_state kernel call. 95 * 96 */ 97 98 #ifndef THREAD_STATUS_H_ 99 #define THREAD_STATUS_H_ 100 101 /* 102 * The actual structure that comprises the thread state is defined 103 * in the machine dependent module. 104 */ 105 #include <sys/mach/mach_types.h> 106 #include <sys/mach/vm_types.h> 107 /* 108 * Generic definition for machine-dependent thread status. 109 */ 110 111 #define x86_THREAD_STATE32 1 112 #define x86_FLOAT_STATE32 2 113 #define x86_EXCEPTION_STATE32 3 114 #define x86_THREAD_STATE64 4 115 #define x86_FLOAT_STATE64 5 116 #define x86_EXCEPTION_STATE64 6 117 #define x86_THREAD_STATE 7 118 #define x86_FLOAT_STATE 8 119 #define x86_EXCEPTION_STATE 9 120 #define x86_DEBUG_STATE32 10 121 #define x86_DEBUG_STATE64 11 122 #define x86_DEBUG_STATE 12 123 #define THREAD_STATE_NONE 13 124 /* 14 and 15 are used for the internal x86_SAVED_STATE flavours */ 125 #define x86_AVX_STATE32 16 126 #define x86_AVX_STATE64 17 127 #define x86_AVX_STATE 18 128 129 130 typedef natural_t *thread_state_t; /* Variable-length array */ 131 132 typedef int thread_state_data_t[THREAD_STATE_MAX]; 133 134 #define THREAD_STATE_FLAVOR_LIST 0 /* List of valid flavors */ 135 136 typedef int thread_state_flavor_t; 137 typedef thread_state_flavor_t *thread_state_flavor_array_t; 138 139 #endif /* THREAD_STATUS_H_ */ 140