Lines Matching refs:handle

85 #define	STRUCT_HANDLE(struct_type, handle)				\  argument
92 } handle = { NULL, DATAMODEL_ILP32 }
94 #define STRUCT_DECL(struct_type, handle) \ argument
95 struct struct_type __##handle##_buf; \
96 STRUCT_HANDLE(struct_type, handle)
98 #define STRUCT_SET_HANDLE(handle, umodel, addr) \ argument
99 (handle).model = (model_t)(umodel) & DATAMODEL_MASK; \
101 ((handle).ptr.m64) = (addr)
103 #define STRUCT_INIT(handle, umodel) \ argument
104 STRUCT_SET_HANDLE(handle, umodel, &__##handle##_buf)
106 #define STRUCT_SIZE(handle) \ argument
107 ((handle).model == DATAMODEL_ILP32 ? \
108 sizeof (*(handle).ptr.m32) : \
109 sizeof (*(handle).ptr.m64))
117 #define STRUCT_FADDR(handle, field) \ argument
118 ((handle).model == DATAMODEL_ILP32 ? \
119 (void *)&(handle).ptr.m32->field : \
120 &(handle).ptr.m64->field)
122 #define STRUCT_FGET(handle, field) \ argument
123 (((handle).model == DATAMODEL_ILP32) ? \
124 (handle).ptr.m32->field : \
125 (handle).ptr.m64->field)
127 #define STRUCT_FGETP(handle, field) \ argument
128 ((handle).model == DATAMODEL_ILP32 ? \
129 (void *)(uintptr_t)(handle).ptr.m32->field : \
130 (handle).ptr.m64->field)
132 #define STRUCT_FSET(handle, field, val) \ argument
133 ((handle).model == DATAMODEL_ILP32 ? \
134 ((handle).ptr.m32->field = (val)) : \
135 ((handle).ptr.m64->field = (val)))
137 #define STRUCT_FSETP(handle, field, val) \ argument
138 ((handle).model == DATAMODEL_ILP32 ? \
139 (void) ((handle).ptr.m32->field = (caddr32_t)(uintptr_t)(val)) : \
140 (void) ((handle).ptr.m64->field = (val)))
142 #define STRUCT_BUF(handle) ((handle).ptr.m64) argument
156 #define STRUCT_HANDLE(struct_type, handle) \ argument
160 } handle = { NULL, DATAMODEL_ILP32 }
162 #define STRUCT_DECL(struct_type, handle) \ argument
163 struct struct_type __##handle##_buf; \
164 STRUCT_HANDLE(struct_type, handle)
166 #define STRUCT_SET_HANDLE(handle, umodel, addr) \ argument
167 (handle).model = (model_t)(umodel) & DATAMODEL_MASK; \
169 (handle).ptr = (addr)
171 #define STRUCT_INIT(handle, umodel) \ argument
172 STRUCT_SET_HANDLE(handle, umodel, &__##handle##_buf)
174 #define STRUCT_SIZE(handle) (sizeof (*(handle).ptr)) argument
176 #define STRUCT_FADDR(handle, field) (&(handle).ptr->field) argument
178 #define STRUCT_FGET(handle, field) ((handle).ptr->field) argument
182 #define STRUCT_FSET(handle, field, val) ((handle).ptr->field = (val)) argument
186 #define STRUCT_BUF(handle) ((handle).ptr) argument