Lines Matching refs:handle

87 #define	STRUCT_HANDLE(struct_type, handle)				\  argument
94 } handle = { NULL, DATAMODEL_ILP32 }
96 #define STRUCT_DECL(struct_type, handle) \ argument
97 struct struct_type __##handle##_buf; \
98 STRUCT_HANDLE(struct_type, handle)
100 #define STRUCT_SET_HANDLE(handle, umodel, addr) \ argument
101 (handle).model = (model_t)(umodel) & DATAMODEL_MASK; \
103 ((handle).ptr.m64) = (addr)
105 #define STRUCT_INIT(handle, umodel) \ argument
106 STRUCT_SET_HANDLE(handle, umodel, &__##handle##_buf)
108 #define STRUCT_SIZE(handle) \ argument
109 ((handle).model == DATAMODEL_ILP32 ? \
110 sizeof (*(handle).ptr.m32) : \
111 sizeof (*(handle).ptr.m64))
119 #define STRUCT_FADDR(handle, field) \ argument
120 ((handle).model == DATAMODEL_ILP32 ? \
121 (void *)&(handle).ptr.m32->field : \
122 &(handle).ptr.m64->field)
124 #define STRUCT_FGET(handle, field) \ argument
125 (((handle).model == DATAMODEL_ILP32) ? \
126 (handle).ptr.m32->field : \
127 (handle).ptr.m64->field)
129 #define STRUCT_FGETP(handle, field) \ argument
130 ((handle).model == DATAMODEL_ILP32 ? \
131 (void *)(uintptr_t)(handle).ptr.m32->field : \
132 (handle).ptr.m64->field)
134 #define STRUCT_FSET(handle, field, val) \ argument
135 ((handle).model == DATAMODEL_ILP32 ? \
136 ((handle).ptr.m32->field = (val)) : \
137 ((handle).ptr.m64->field = (val)))
139 #define STRUCT_FSETP(handle, field, val) \ argument
140 ((handle).model == DATAMODEL_ILP32 ? \
141 (void) ((handle).ptr.m32->field = (caddr32_t)(uintptr_t)(val)) : \
142 (void) ((handle).ptr.m64->field = (val)))
144 #define STRUCT_BUF(handle) ((handle).ptr.m64) argument
158 #define STRUCT_HANDLE(struct_type, handle) \ argument
161 } handle = { NULL }
163 #define STRUCT_DECL(struct_type, handle) \ argument
164 struct struct_type __##handle##_buf; \
165 STRUCT_HANDLE(struct_type, handle)
168 #define STRUCT_SET_HANDLE(handle, umodel, addr) \ argument
170 (handle).ptr = (addr)
172 #define STRUCT_SET_HANDLE(handle, umodel, addr) \ argument
173 (handle).ptr = (addr)
176 #define STRUCT_INIT(handle, umodel) \ argument
177 STRUCT_SET_HANDLE(handle, umodel, &__##handle##_buf)
179 #define STRUCT_SIZE(handle) (sizeof (*(handle).ptr)) argument
181 #define STRUCT_FADDR(handle, field) (&(handle).ptr->field) argument
183 #define STRUCT_FGET(handle, field) ((handle).ptr->field) argument
187 #define STRUCT_FSET(handle, field, val) ((handle).ptr->field = (val)) argument
191 #define STRUCT_BUF(handle) ((handle).ptr) argument