20 * CDDL HEADER END
21 */
22 /*
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 #ifndef _SYS_MODEL_H
28 #define _SYS_MODEL_H
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 #if defined(_KERNEL) && !defined(_ASM)
35 #include <sys/debug.h>
36 #endif /* _KERNEL && !_ASM */
37
38 #include <sys/isa_defs.h>
39
40 #if defined(_KERNEL) || defined(_KMEMUSER)
41
42 /*
43 * These bits are used in various places to specify the data model
44 * of the originator (and/or consumer) of data items. See <sys/conf.h>
45 * <sys/file.h>, <sys/stream.h> and <sys/sunddi.h>.
46 *
47 * This state should only be known to the kernel implementation.
48 */
49 #define DATAMODEL_MASK 0x0FF00000
50
51 #define DATAMODEL_ILP32 0x00100000
52 #define DATAMODEL_LP64 0x00200000
53
54 #define DATAMODEL_NONE 0
55
56 #if defined(_LP64)
57 #define DATAMODEL_NATIVE DATAMODEL_LP64
58 #elif defined(_ILP32)
59 #define DATAMODEL_NATIVE DATAMODEL_ILP32
60 #else
|
20 * CDDL HEADER END
21 */
22 /*
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 #ifndef _SYS_MODEL_H
28 #define _SYS_MODEL_H
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 #if defined(_KERNEL) && !defined(_ASM)
35 #include <sys/debug.h>
36 #endif /* _KERNEL && !_ASM */
37
38 #include <sys/isa_defs.h>
39
40 #if defined(_KERNEL) || defined(_FAKE_KERNEL) || defined(_KMEMUSER)
41
42 /*
43 * These bits are used in various places to specify the data model
44 * of the originator (and/or consumer) of data items. See <sys/conf.h>
45 * <sys/file.h>, <sys/stream.h> and <sys/sunddi.h>.
46 *
47 * This state should only be known to the kernel implementation.
48 */
49 #define DATAMODEL_MASK 0x0FF00000
50
51 #define DATAMODEL_ILP32 0x00100000
52 #define DATAMODEL_LP64 0x00200000
53
54 #define DATAMODEL_NONE 0
55
56 #if defined(_LP64)
57 #define DATAMODEL_NATIVE DATAMODEL_LP64
58 #elif defined(_ILP32)
59 #define DATAMODEL_NATIVE DATAMODEL_ILP32
60 #else
|