Lines Matching refs:handle

96 #define	STRUCT_HANDLE(struct_type, handle)				\  argument
97 struct __##handle##_type { \
103 } handle = { NULL, DATAMODEL_ILP32 }
105 #define STRUCT_DECL(struct_type, handle) \ argument
106 struct struct_type __##handle##_buf; \
107 STRUCT_HANDLE(struct_type, handle)
109 #define STRUCT_SET_HANDLE(handle, umodel, addr) \ argument
110 (handle).model = (model_t)(umodel) & DATAMODEL_MASK; \
112 ((handle).ptr.m64) = (addr)
114 #define STRUCT_INIT(handle, umodel) \ argument
115 STRUCT_SET_HANDLE(handle, umodel, &__##handle##_buf)
117 #define STRUCT_SIZE(handle) \ argument
118 ((handle).model == DATAMODEL_ILP32 ? \
119 sizeof (*(handle).ptr.m32) : \
120 sizeof (*(handle).ptr.m64))
128 #define STRUCT_FADDR(handle, field) \ argument
129 ((handle).model == DATAMODEL_ILP32 ? \
130 (void *)&(handle).ptr.m32->field : \
131 &(handle).ptr.m64->field)
133 #define STRUCT_FGET(handle, field) \ argument
134 (((handle).model == DATAMODEL_ILP32) ? \
135 (handle).ptr.m32->field : \
136 (handle).ptr.m64->field)
138 #define STRUCT_FGETP(handle, field) \ argument
139 ((handle).model == DATAMODEL_ILP32 ? \
140 (void *)(handle).ptr.m32->field : \
141 (handle).ptr.m64->field)
143 #define STRUCT_FSET(handle, field, val) \ argument
144 ((handle).model == DATAMODEL_ILP32 ? \
145 ((handle).ptr.m32->field = (val)) : \
146 ((handle).ptr.m64->field = (val)))
148 #define STRUCT_FSETP(handle, field, val) \ argument
149 ((handle).model == DATAMODEL_ILP32 ? \
150 (void) ((handle).ptr.m32->field = (caddr32_t)(val)) : \
151 (void) ((handle).ptr.m64->field = (val)))
153 #define STRUCT_BUF(handle) ((handle).ptr.m64) argument
167 #define STRUCT_HANDLE(struct_type, handle) \ argument
168 struct __##handle##_32 { \
171 struct __##handle##_32 handle = { NULL }
173 #define STRUCT_DECL(struct_type, handle) \ argument
174 struct struct_type __##handle##_buf; \
175 STRUCT_HANDLE(struct_type, handle)
178 #define STRUCT_SET_HANDLE(handle, umodel, addr) \ argument
180 (handle).ptr = (addr)
182 #define STRUCT_SET_HANDLE(handle, umodel, addr) \ argument
183 (handle).ptr = (addr)
186 #define STRUCT_INIT(handle, umodel) \ argument
187 STRUCT_SET_HANDLE(handle, umodel, &__##handle##_buf)
189 #define STRUCT_SIZE(handle) (sizeof (*(handle).ptr)) argument
191 #define STRUCT_FADDR(handle, field) (&(handle).ptr->field) argument
193 #define STRUCT_FGET(handle, field) ((handle).ptr->field) argument
197 #define STRUCT_FSET(handle, field, val) ((handle).ptr->field = (val)) argument
201 #define STRUCT_BUF(handle) ((handle).ptr) argument