1700 Add SCSI UNMAP support
[unleashed.git] / usr / src / uts / common / sys / core.h
blob543ed5fadacb032f7e7c3d23a03b16fb4ed3f8b7
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
25 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
26 * Use is subject to license terms.
29 #ifndef _SYS_CORE_H
30 #define _SYS_CORE_H
32 #ifndef _KERNEL
33 #include <sys/reg.h>
34 #endif /* _KERNEL */
36 #include <sys/exechdr.h>
37 #include <sys/pcb.h>
38 #include <sys/user.h>
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
44 #define CORE_MAGIC 0x080456
45 #define CORE_NAMELEN 16
47 #if !defined(_LP64) && !defined(_KERNEL)
49 * This structure describes the header of the old 32-bit SunOS 4.x aout exec
50 * module's core files. Following the header, copies of the data and stack
51 * segments and a copy of the user struct were recorded in the core file.
52 * These core files have not been produced since SunOS 5.5; new debuggers
53 * should not make use of this structure. The structure is not suitable for
54 * 64-bit consumers and will be removed altogether in a future Solaris release.
56 struct core {
57 int c_magic; /* Corefile magic number */
58 int c_len; /* Sizeof (struct core) */
59 struct regs c_regs; /* General purpose registers */
60 struct exdata c_exdata; /* Executable header */
61 int c_signo; /* Killing signal, if any */
62 int c_tsize; /* Text size (bytes) */
63 int c_dsize; /* Data size (bytes) */
64 int c_ssize; /* Stack size (bytes) */
65 char c_cmdname[CORE_NAMELEN + 1]; /* Command name */
66 struct _fpu c_fpu; /* external FPU state */
67 #if defined(__sparc)
68 struct _fq c_fpu_q[_MAXFPQ]; /* fpu exception queue */
69 #endif
70 int c_ucode; /* Exception no. from u_code */
72 #endif /* !_LP64 && !_KERNEL */
74 #ifdef _KERNEL
76 extern int core(int, int);
78 #endif /* _KERNEL */
80 #ifdef __cplusplus
82 #endif
84 #endif /* _SYS_CORE_H */