summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/common/sys/model.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/usr/src/uts/common/sys/model.h b/usr/src/uts/common/sys/model.h
index d3286ad1ec..fab96bbe00 100644
--- a/usr/src/uts/common/sys/model.h
+++ b/usr/src/uts/common/sys/model.h
@@ -156,20 +156,17 @@ typedef unsigned int model_t;
#define STRUCT_HANDLE(struct_type, handle) \
struct { \
struct struct_type *ptr; \
- } handle = { NULL }
+ model_t model; \
+ } handle = { NULL, DATAMODEL_ILP32 }
#define STRUCT_DECL(struct_type, handle) \
struct struct_type __##handle##_buf; \
STRUCT_HANDLE(struct_type, handle)
-#ifdef __lint
-#define STRUCT_SET_HANDLE(handle, umodel, addr) \
- (void) (umodel); \
- (handle).ptr = (addr)
-#else
#define STRUCT_SET_HANDLE(handle, umodel, addr) \
+ (handle).model = (model_t)(umodel) & DATAMODEL_MASK; \
+ ASSERT(((umodel) & DATAMODEL_MASK) == DATAMODEL_ILP32); \
(handle).ptr = (addr)
-#endif /* __lint */
#define STRUCT_INIT(handle, umodel) \
STRUCT_SET_HANDLE(handle, umodel, &__##handle##_buf)