2 * This file generated automatically from sync.xml by c_client.py.
12 #include <stddef.h> /* for offsetof() */
16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
19 xcb_extension_t xcb_sync_id
= { "SYNC", 0 };
22 xcb_sync_alarm_next (xcb_sync_alarm_iterator_t
*i
/**< */)
26 i
->index
+= sizeof(xcb_sync_alarm_t
);
29 xcb_generic_iterator_t
30 xcb_sync_alarm_end (xcb_sync_alarm_iterator_t i
/**< */)
32 xcb_generic_iterator_t ret
;
33 ret
.data
= i
.data
+ i
.rem
;
34 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
40 xcb_sync_counter_next (xcb_sync_counter_iterator_t
*i
/**< */)
44 i
->index
+= sizeof(xcb_sync_counter_t
);
47 xcb_generic_iterator_t
48 xcb_sync_counter_end (xcb_sync_counter_iterator_t i
/**< */)
50 xcb_generic_iterator_t ret
;
51 ret
.data
= i
.data
+ i
.rem
;
52 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
58 xcb_sync_fence_next (xcb_sync_fence_iterator_t
*i
/**< */)
62 i
->index
+= sizeof(xcb_sync_fence_t
);
65 xcb_generic_iterator_t
66 xcb_sync_fence_end (xcb_sync_fence_iterator_t i
/**< */)
68 xcb_generic_iterator_t ret
;
69 ret
.data
= i
.data
+ i
.rem
;
70 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
76 xcb_sync_int64_next (xcb_sync_int64_iterator_t
*i
/**< */)
80 i
->index
+= sizeof(xcb_sync_int64_t
);
83 xcb_generic_iterator_t
84 xcb_sync_int64_end (xcb_sync_int64_iterator_t i
/**< */)
86 xcb_generic_iterator_t ret
;
87 ret
.data
= i
.data
+ i
.rem
;
88 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
94 xcb_sync_systemcounter_sizeof (const void *_buffer
/**< */)
96 char *xcb_tmp
= (char *)_buffer
;
97 const xcb_sync_systemcounter_t
*_aux
= (xcb_sync_systemcounter_t
*)_buffer
;
98 unsigned int xcb_buffer_len
= 0;
99 unsigned int xcb_block_len
= 0;
100 unsigned int xcb_pad
= 0;
101 unsigned int xcb_align_to
= 0;
104 xcb_block_len
+= sizeof(xcb_sync_systemcounter_t
);
105 xcb_tmp
+= xcb_block_len
;
106 xcb_buffer_len
+= xcb_block_len
;
109 xcb_block_len
+= _aux
->name_len
* sizeof(char);
110 xcb_tmp
+= xcb_block_len
;
111 xcb_align_to
= ALIGNOF(char);
113 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
114 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
121 return xcb_buffer_len
;
125 xcb_sync_systemcounter_name (const xcb_sync_systemcounter_t
*R
/**< */)
127 return (char *) (R
+ 1);
131 xcb_sync_systemcounter_name_length (const xcb_sync_systemcounter_t
*R
/**< */)
136 xcb_generic_iterator_t
137 xcb_sync_systemcounter_name_end (const xcb_sync_systemcounter_t
*R
/**< */)
139 xcb_generic_iterator_t i
;
140 i
.data
= ((char *) (R
+ 1)) + (R
->name_len
);
142 i
.index
= (char *) i
.data
- (char *) R
;
147 xcb_sync_systemcounter_next (xcb_sync_systemcounter_iterator_t
*i
/**< */)
149 xcb_sync_systemcounter_t
*R
= i
->data
;
150 xcb_generic_iterator_t child
;
151 child
.data
= (xcb_sync_systemcounter_t
*)(((char *)R
) + xcb_sync_systemcounter_sizeof(R
));
152 i
->index
= (char *) child
.data
- (char *) i
->data
;
154 i
->data
= (xcb_sync_systemcounter_t
*) child
.data
;
157 xcb_generic_iterator_t
158 xcb_sync_systemcounter_end (xcb_sync_systemcounter_iterator_t i
/**< */)
160 xcb_generic_iterator_t ret
;
162 xcb_sync_systemcounter_next(&i
);
170 xcb_sync_trigger_next (xcb_sync_trigger_iterator_t
*i
/**< */)
174 i
->index
+= sizeof(xcb_sync_trigger_t
);
177 xcb_generic_iterator_t
178 xcb_sync_trigger_end (xcb_sync_trigger_iterator_t i
/**< */)
180 xcb_generic_iterator_t ret
;
181 ret
.data
= i
.data
+ i
.rem
;
182 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
188 xcb_sync_waitcondition_next (xcb_sync_waitcondition_iterator_t
*i
/**< */)
192 i
->index
+= sizeof(xcb_sync_waitcondition_t
);
195 xcb_generic_iterator_t
196 xcb_sync_waitcondition_end (xcb_sync_waitcondition_iterator_t i
/**< */)
198 xcb_generic_iterator_t ret
;
199 ret
.data
= i
.data
+ i
.rem
;
200 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
205 xcb_sync_initialize_cookie_t
206 xcb_sync_initialize (xcb_connection_t
*c
/**< */,
207 uint8_t desired_major_version
/**< */,
208 uint8_t desired_minor_version
/**< */)
210 static const xcb_protocol_request_t xcb_req
= {
212 /* ext */ &xcb_sync_id
,
213 /* opcode */ XCB_SYNC_INITIALIZE
,
217 struct iovec xcb_parts
[4];
218 xcb_sync_initialize_cookie_t xcb_ret
;
219 xcb_sync_initialize_request_t xcb_out
;
221 xcb_out
.desired_major_version
= desired_major_version
;
222 xcb_out
.desired_minor_version
= desired_minor_version
;
224 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
225 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
226 xcb_parts
[3].iov_base
= 0;
227 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
229 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
233 xcb_sync_initialize_cookie_t
234 xcb_sync_initialize_unchecked (xcb_connection_t
*c
/**< */,
235 uint8_t desired_major_version
/**< */,
236 uint8_t desired_minor_version
/**< */)
238 static const xcb_protocol_request_t xcb_req
= {
240 /* ext */ &xcb_sync_id
,
241 /* opcode */ XCB_SYNC_INITIALIZE
,
245 struct iovec xcb_parts
[4];
246 xcb_sync_initialize_cookie_t xcb_ret
;
247 xcb_sync_initialize_request_t xcb_out
;
249 xcb_out
.desired_major_version
= desired_major_version
;
250 xcb_out
.desired_minor_version
= desired_minor_version
;
252 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
253 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
254 xcb_parts
[3].iov_base
= 0;
255 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
257 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
261 xcb_sync_initialize_reply_t
*
262 xcb_sync_initialize_reply (xcb_connection_t
*c
/**< */,
263 xcb_sync_initialize_cookie_t cookie
/**< */,
264 xcb_generic_error_t
**e
/**< */)
266 return (xcb_sync_initialize_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
270 xcb_sync_list_system_counters_sizeof (const void *_buffer
/**< */)
272 char *xcb_tmp
= (char *)_buffer
;
273 const xcb_sync_list_system_counters_reply_t
*_aux
= (xcb_sync_list_system_counters_reply_t
*)_buffer
;
274 unsigned int xcb_buffer_len
= 0;
275 unsigned int xcb_block_len
= 0;
276 unsigned int xcb_pad
= 0;
277 unsigned int xcb_align_to
= 0;
280 unsigned int xcb_tmp_len
;
282 xcb_block_len
+= sizeof(xcb_sync_list_system_counters_reply_t
);
283 xcb_tmp
+= xcb_block_len
;
284 xcb_buffer_len
+= xcb_block_len
;
287 for(i
=0; i
<_aux
->counters_len
; i
++) {
288 xcb_tmp_len
= xcb_sync_systemcounter_sizeof(xcb_tmp
);
289 xcb_block_len
+= xcb_tmp_len
;
290 xcb_tmp
+= xcb_tmp_len
;
292 xcb_align_to
= ALIGNOF(xcb_sync_systemcounter_t
);
294 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
295 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
302 return xcb_buffer_len
;
305 xcb_sync_list_system_counters_cookie_t
306 xcb_sync_list_system_counters (xcb_connection_t
*c
/**< */)
308 static const xcb_protocol_request_t xcb_req
= {
310 /* ext */ &xcb_sync_id
,
311 /* opcode */ XCB_SYNC_LIST_SYSTEM_COUNTERS
,
315 struct iovec xcb_parts
[4];
316 xcb_sync_list_system_counters_cookie_t xcb_ret
;
317 xcb_sync_list_system_counters_request_t xcb_out
;
320 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
321 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
322 xcb_parts
[3].iov_base
= 0;
323 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
325 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
329 xcb_sync_list_system_counters_cookie_t
330 xcb_sync_list_system_counters_unchecked (xcb_connection_t
*c
/**< */)
332 static const xcb_protocol_request_t xcb_req
= {
334 /* ext */ &xcb_sync_id
,
335 /* opcode */ XCB_SYNC_LIST_SYSTEM_COUNTERS
,
339 struct iovec xcb_parts
[4];
340 xcb_sync_list_system_counters_cookie_t xcb_ret
;
341 xcb_sync_list_system_counters_request_t xcb_out
;
344 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
345 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
346 xcb_parts
[3].iov_base
= 0;
347 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
349 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
354 xcb_sync_list_system_counters_counters_length (const xcb_sync_list_system_counters_reply_t
*R
/**< */)
356 return R
->counters_len
;
359 xcb_sync_systemcounter_iterator_t
360 xcb_sync_list_system_counters_counters_iterator (const xcb_sync_list_system_counters_reply_t
*R
/**< */)
362 xcb_sync_systemcounter_iterator_t i
;
363 i
.data
= (xcb_sync_systemcounter_t
*) (R
+ 1);
364 i
.rem
= R
->counters_len
;
365 i
.index
= (char *) i
.data
- (char *) R
;
369 xcb_sync_list_system_counters_reply_t
*
370 xcb_sync_list_system_counters_reply (xcb_connection_t
*c
/**< */,
371 xcb_sync_list_system_counters_cookie_t cookie
/**< */,
372 xcb_generic_error_t
**e
/**< */)
374 return (xcb_sync_list_system_counters_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
378 xcb_sync_create_counter_checked (xcb_connection_t
*c
/**< */,
379 xcb_sync_counter_t id
/**< */,
380 xcb_sync_int64_t initial_value
/**< */)
382 static const xcb_protocol_request_t xcb_req
= {
384 /* ext */ &xcb_sync_id
,
385 /* opcode */ XCB_SYNC_CREATE_COUNTER
,
389 struct iovec xcb_parts
[4];
390 xcb_void_cookie_t xcb_ret
;
391 xcb_sync_create_counter_request_t xcb_out
;
394 xcb_out
.initial_value
= initial_value
;
396 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
397 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
398 xcb_parts
[3].iov_base
= 0;
399 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
401 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
406 xcb_sync_create_counter (xcb_connection_t
*c
/**< */,
407 xcb_sync_counter_t id
/**< */,
408 xcb_sync_int64_t initial_value
/**< */)
410 static const xcb_protocol_request_t xcb_req
= {
412 /* ext */ &xcb_sync_id
,
413 /* opcode */ XCB_SYNC_CREATE_COUNTER
,
417 struct iovec xcb_parts
[4];
418 xcb_void_cookie_t xcb_ret
;
419 xcb_sync_create_counter_request_t xcb_out
;
422 xcb_out
.initial_value
= initial_value
;
424 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
425 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
426 xcb_parts
[3].iov_base
= 0;
427 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
429 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
434 xcb_sync_destroy_counter_checked (xcb_connection_t
*c
/**< */,
435 xcb_sync_counter_t counter
/**< */)
437 static const xcb_protocol_request_t xcb_req
= {
439 /* ext */ &xcb_sync_id
,
440 /* opcode */ XCB_SYNC_DESTROY_COUNTER
,
444 struct iovec xcb_parts
[4];
445 xcb_void_cookie_t xcb_ret
;
446 xcb_sync_destroy_counter_request_t xcb_out
;
448 xcb_out
.counter
= counter
;
450 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
451 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
452 xcb_parts
[3].iov_base
= 0;
453 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
455 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
460 xcb_sync_destroy_counter (xcb_connection_t
*c
/**< */,
461 xcb_sync_counter_t counter
/**< */)
463 static const xcb_protocol_request_t xcb_req
= {
465 /* ext */ &xcb_sync_id
,
466 /* opcode */ XCB_SYNC_DESTROY_COUNTER
,
470 struct iovec xcb_parts
[4];
471 xcb_void_cookie_t xcb_ret
;
472 xcb_sync_destroy_counter_request_t xcb_out
;
474 xcb_out
.counter
= counter
;
476 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
477 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
478 xcb_parts
[3].iov_base
= 0;
479 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
481 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
485 xcb_sync_query_counter_cookie_t
486 xcb_sync_query_counter (xcb_connection_t
*c
/**< */,
487 xcb_sync_counter_t counter
/**< */)
489 static const xcb_protocol_request_t xcb_req
= {
491 /* ext */ &xcb_sync_id
,
492 /* opcode */ XCB_SYNC_QUERY_COUNTER
,
496 struct iovec xcb_parts
[4];
497 xcb_sync_query_counter_cookie_t xcb_ret
;
498 xcb_sync_query_counter_request_t xcb_out
;
500 xcb_out
.counter
= counter
;
502 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
503 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
504 xcb_parts
[3].iov_base
= 0;
505 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
507 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
511 xcb_sync_query_counter_cookie_t
512 xcb_sync_query_counter_unchecked (xcb_connection_t
*c
/**< */,
513 xcb_sync_counter_t counter
/**< */)
515 static const xcb_protocol_request_t xcb_req
= {
517 /* ext */ &xcb_sync_id
,
518 /* opcode */ XCB_SYNC_QUERY_COUNTER
,
522 struct iovec xcb_parts
[4];
523 xcb_sync_query_counter_cookie_t xcb_ret
;
524 xcb_sync_query_counter_request_t xcb_out
;
526 xcb_out
.counter
= counter
;
528 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
529 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
530 xcb_parts
[3].iov_base
= 0;
531 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
533 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
537 xcb_sync_query_counter_reply_t
*
538 xcb_sync_query_counter_reply (xcb_connection_t
*c
/**< */,
539 xcb_sync_query_counter_cookie_t cookie
/**< */,
540 xcb_generic_error_t
**e
/**< */)
542 return (xcb_sync_query_counter_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
546 xcb_sync_await_sizeof (const void *_buffer
/**< */,
547 uint32_t wait_list_len
/**< */)
549 char *xcb_tmp
= (char *)_buffer
;
550 unsigned int xcb_buffer_len
= 0;
551 unsigned int xcb_block_len
= 0;
552 unsigned int xcb_pad
= 0;
553 unsigned int xcb_align_to
= 0;
556 xcb_block_len
+= sizeof(xcb_sync_await_request_t
);
557 xcb_tmp
+= xcb_block_len
;
558 xcb_buffer_len
+= xcb_block_len
;
561 xcb_block_len
+= wait_list_len
* sizeof(xcb_sync_waitcondition_t
);
562 xcb_tmp
+= xcb_block_len
;
563 xcb_align_to
= ALIGNOF(xcb_sync_waitcondition_t
);
565 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
566 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
573 return xcb_buffer_len
;
577 xcb_sync_await_checked (xcb_connection_t
*c
/**< */,
578 uint32_t wait_list_len
/**< */,
579 const xcb_sync_waitcondition_t
*wait_list
/**< */)
581 static const xcb_protocol_request_t xcb_req
= {
583 /* ext */ &xcb_sync_id
,
584 /* opcode */ XCB_SYNC_AWAIT
,
588 struct iovec xcb_parts
[6];
589 xcb_void_cookie_t xcb_ret
;
590 xcb_sync_await_request_t xcb_out
;
593 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
594 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
595 xcb_parts
[3].iov_base
= 0;
596 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
597 /* xcb_sync_waitcondition_t wait_list */
598 xcb_parts
[4].iov_base
= (char *) wait_list
;
599 xcb_parts
[4].iov_len
= wait_list_len
* sizeof(xcb_sync_waitcondition_t
);
600 xcb_parts
[5].iov_base
= 0;
601 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
603 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
608 xcb_sync_await (xcb_connection_t
*c
/**< */,
609 uint32_t wait_list_len
/**< */,
610 const xcb_sync_waitcondition_t
*wait_list
/**< */)
612 static const xcb_protocol_request_t xcb_req
= {
614 /* ext */ &xcb_sync_id
,
615 /* opcode */ XCB_SYNC_AWAIT
,
619 struct iovec xcb_parts
[6];
620 xcb_void_cookie_t xcb_ret
;
621 xcb_sync_await_request_t xcb_out
;
624 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
625 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
626 xcb_parts
[3].iov_base
= 0;
627 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
628 /* xcb_sync_waitcondition_t wait_list */
629 xcb_parts
[4].iov_base
= (char *) wait_list
;
630 xcb_parts
[4].iov_len
= wait_list_len
* sizeof(xcb_sync_waitcondition_t
);
631 xcb_parts
[5].iov_base
= 0;
632 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
634 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
639 xcb_sync_change_counter_checked (xcb_connection_t
*c
/**< */,
640 xcb_sync_counter_t counter
/**< */,
641 xcb_sync_int64_t amount
/**< */)
643 static const xcb_protocol_request_t xcb_req
= {
645 /* ext */ &xcb_sync_id
,
646 /* opcode */ XCB_SYNC_CHANGE_COUNTER
,
650 struct iovec xcb_parts
[4];
651 xcb_void_cookie_t xcb_ret
;
652 xcb_sync_change_counter_request_t xcb_out
;
654 xcb_out
.counter
= counter
;
655 xcb_out
.amount
= amount
;
657 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
658 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
659 xcb_parts
[3].iov_base
= 0;
660 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
662 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
667 xcb_sync_change_counter (xcb_connection_t
*c
/**< */,
668 xcb_sync_counter_t counter
/**< */,
669 xcb_sync_int64_t amount
/**< */)
671 static const xcb_protocol_request_t xcb_req
= {
673 /* ext */ &xcb_sync_id
,
674 /* opcode */ XCB_SYNC_CHANGE_COUNTER
,
678 struct iovec xcb_parts
[4];
679 xcb_void_cookie_t xcb_ret
;
680 xcb_sync_change_counter_request_t xcb_out
;
682 xcb_out
.counter
= counter
;
683 xcb_out
.amount
= amount
;
685 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
686 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
687 xcb_parts
[3].iov_base
= 0;
688 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
690 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
695 xcb_sync_set_counter_checked (xcb_connection_t
*c
/**< */,
696 xcb_sync_counter_t counter
/**< */,
697 xcb_sync_int64_t value
/**< */)
699 static const xcb_protocol_request_t xcb_req
= {
701 /* ext */ &xcb_sync_id
,
702 /* opcode */ XCB_SYNC_SET_COUNTER
,
706 struct iovec xcb_parts
[4];
707 xcb_void_cookie_t xcb_ret
;
708 xcb_sync_set_counter_request_t xcb_out
;
710 xcb_out
.counter
= counter
;
711 xcb_out
.value
= value
;
713 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
714 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
715 xcb_parts
[3].iov_base
= 0;
716 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
718 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
723 xcb_sync_set_counter (xcb_connection_t
*c
/**< */,
724 xcb_sync_counter_t counter
/**< */,
725 xcb_sync_int64_t value
/**< */)
727 static const xcb_protocol_request_t xcb_req
= {
729 /* ext */ &xcb_sync_id
,
730 /* opcode */ XCB_SYNC_SET_COUNTER
,
734 struct iovec xcb_parts
[4];
735 xcb_void_cookie_t xcb_ret
;
736 xcb_sync_set_counter_request_t xcb_out
;
738 xcb_out
.counter
= counter
;
739 xcb_out
.value
= value
;
741 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
742 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
743 xcb_parts
[3].iov_base
= 0;
744 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
746 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
751 xcb_sync_create_alarm_value_list_serialize (void **_buffer
/**< */,
752 uint32_t value_mask
/**< */,
753 const xcb_sync_create_alarm_value_list_t
*_aux
/**< */)
755 char *xcb_out
= *_buffer
;
756 unsigned int xcb_buffer_len
= 0;
757 unsigned int xcb_align_to
= 0;
759 unsigned int xcb_pad
= 0;
760 char xcb_pad0
[3] = {0, 0, 0};
761 struct iovec xcb_parts
[7];
762 unsigned int xcb_parts_idx
= 0;
763 unsigned int xcb_block_len
= 0;
767 if(value_mask
& XCB_SYNC_CA_COUNTER
) {
768 /* xcb_sync_create_alarm_value_list_t.counter */
769 xcb_parts
[xcb_parts_idx
].iov_base
= (char *) &_aux
->counter
;
770 xcb_block_len
+= sizeof(xcb_sync_counter_t
);
771 xcb_parts
[xcb_parts_idx
].iov_len
= sizeof(xcb_sync_counter_t
);
773 xcb_align_to
= ALIGNOF(xcb_sync_counter_t
);
775 if(value_mask
& XCB_SYNC_CA_VALUE_TYPE
) {
776 /* xcb_sync_create_alarm_value_list_t.valueType */
777 xcb_parts
[xcb_parts_idx
].iov_base
= (char *) &_aux
->valueType
;
778 xcb_block_len
+= sizeof(uint32_t);
779 xcb_parts
[xcb_parts_idx
].iov_len
= sizeof(uint32_t);
781 xcb_align_to
= ALIGNOF(uint32_t);
783 if(value_mask
& XCB_SYNC_CA_VALUE
) {
784 /* xcb_sync_create_alarm_value_list_t.value */
785 xcb_parts
[xcb_parts_idx
].iov_base
= (char *) &_aux
->value
;
786 xcb_block_len
+= sizeof(xcb_sync_int64_t
);
787 xcb_parts
[xcb_parts_idx
].iov_len
= sizeof(xcb_sync_int64_t
);
789 xcb_align_to
= ALIGNOF(xcb_sync_int64_t
);
791 if(value_mask
& XCB_SYNC_CA_TEST_TYPE
) {
792 /* xcb_sync_create_alarm_value_list_t.testType */
793 xcb_parts
[xcb_parts_idx
].iov_base
= (char *) &_aux
->testType
;
794 xcb_block_len
+= sizeof(uint32_t);
795 xcb_parts
[xcb_parts_idx
].iov_len
= sizeof(uint32_t);
797 xcb_align_to
= ALIGNOF(uint32_t);
799 if(value_mask
& XCB_SYNC_CA_DELTA
) {
800 /* xcb_sync_create_alarm_value_list_t.delta */
801 xcb_parts
[xcb_parts_idx
].iov_base
= (char *) &_aux
->delta
;
802 xcb_block_len
+= sizeof(xcb_sync_int64_t
);
803 xcb_parts
[xcb_parts_idx
].iov_len
= sizeof(xcb_sync_int64_t
);
805 xcb_align_to
= ALIGNOF(xcb_sync_int64_t
);
807 if(value_mask
& XCB_SYNC_CA_EVENTS
) {
808 /* xcb_sync_create_alarm_value_list_t.events */
809 xcb_parts
[xcb_parts_idx
].iov_base
= (char *) &_aux
->events
;
810 xcb_block_len
+= sizeof(uint32_t);
811 xcb_parts
[xcb_parts_idx
].iov_len
= sizeof(uint32_t);
813 xcb_align_to
= ALIGNOF(uint32_t);
816 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
817 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
819 xcb_parts
[xcb_parts_idx
].iov_base
= xcb_pad0
;
820 xcb_parts
[xcb_parts_idx
].iov_len
= xcb_pad
;
826 if (NULL
== xcb_out
) {
827 /* allocate memory */
828 xcb_out
= malloc(xcb_buffer_len
);
833 for(i
=0; i
<xcb_parts_idx
; i
++) {
834 if (0 != xcb_parts
[i
].iov_base
&& 0 != xcb_parts
[i
].iov_len
)
835 memcpy(xcb_tmp
, xcb_parts
[i
].iov_base
, xcb_parts
[i
].iov_len
);
836 if (0 != xcb_parts
[i
].iov_len
)
837 xcb_tmp
+= xcb_parts
[i
].iov_len
;
840 return xcb_buffer_len
;
844 xcb_sync_create_alarm_value_list_unpack (const void *_buffer
/**< */,
845 uint32_t value_mask
/**< */,
846 xcb_sync_create_alarm_value_list_t
*_aux
/**< */)
848 char *xcb_tmp
= (char *)_buffer
;
849 unsigned int xcb_buffer_len
= 0;
850 unsigned int xcb_block_len
= 0;
851 unsigned int xcb_pad
= 0;
852 unsigned int xcb_align_to
= 0;
855 if(value_mask
& XCB_SYNC_CA_COUNTER
) {
856 /* xcb_sync_create_alarm_value_list_t.counter */
857 _aux
->counter
= *(xcb_sync_counter_t
*)xcb_tmp
;
858 xcb_block_len
+= sizeof(xcb_sync_counter_t
);
859 xcb_tmp
+= sizeof(xcb_sync_counter_t
);
860 xcb_align_to
= ALIGNOF(xcb_sync_counter_t
);
862 if(value_mask
& XCB_SYNC_CA_VALUE_TYPE
) {
863 /* xcb_sync_create_alarm_value_list_t.valueType */
864 _aux
->valueType
= *(uint32_t *)xcb_tmp
;
865 xcb_block_len
+= sizeof(uint32_t);
866 xcb_tmp
+= sizeof(uint32_t);
867 xcb_align_to
= ALIGNOF(uint32_t);
869 if(value_mask
& XCB_SYNC_CA_VALUE
) {
870 /* xcb_sync_create_alarm_value_list_t.value */
871 _aux
->value
= *(xcb_sync_int64_t
*)xcb_tmp
;
872 xcb_block_len
+= sizeof(xcb_sync_int64_t
);
873 xcb_tmp
+= sizeof(xcb_sync_int64_t
);
874 xcb_align_to
= ALIGNOF(xcb_sync_int64_t
);
876 if(value_mask
& XCB_SYNC_CA_TEST_TYPE
) {
877 /* xcb_sync_create_alarm_value_list_t.testType */
878 _aux
->testType
= *(uint32_t *)xcb_tmp
;
879 xcb_block_len
+= sizeof(uint32_t);
880 xcb_tmp
+= sizeof(uint32_t);
881 xcb_align_to
= ALIGNOF(uint32_t);
883 if(value_mask
& XCB_SYNC_CA_DELTA
) {
884 /* xcb_sync_create_alarm_value_list_t.delta */
885 _aux
->delta
= *(xcb_sync_int64_t
*)xcb_tmp
;
886 xcb_block_len
+= sizeof(xcb_sync_int64_t
);
887 xcb_tmp
+= sizeof(xcb_sync_int64_t
);
888 xcb_align_to
= ALIGNOF(xcb_sync_int64_t
);
890 if(value_mask
& XCB_SYNC_CA_EVENTS
) {
891 /* xcb_sync_create_alarm_value_list_t.events */
892 _aux
->events
= *(uint32_t *)xcb_tmp
;
893 xcb_block_len
+= sizeof(uint32_t);
894 xcb_tmp
+= sizeof(uint32_t);
895 xcb_align_to
= ALIGNOF(uint32_t);
898 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
899 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
906 return xcb_buffer_len
;
910 xcb_sync_create_alarm_value_list_sizeof (const void *_buffer
/**< */,
911 uint32_t value_mask
/**< */)
913 xcb_sync_create_alarm_value_list_t _aux
;
914 return xcb_sync_create_alarm_value_list_unpack(_buffer
, value_mask
, &_aux
);
918 xcb_sync_create_alarm_checked (xcb_connection_t
*c
/**< */,
919 xcb_sync_alarm_t id
/**< */,
920 uint32_t value_mask
/**< */,
921 const void *value_list
/**< */)
923 static const xcb_protocol_request_t xcb_req
= {
925 /* ext */ &xcb_sync_id
,
926 /* opcode */ XCB_SYNC_CREATE_ALARM
,
930 struct iovec xcb_parts
[5];
931 xcb_void_cookie_t xcb_ret
;
932 xcb_sync_create_alarm_request_t xcb_out
;
935 xcb_out
.value_mask
= value_mask
;
937 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
938 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
939 xcb_parts
[3].iov_base
= 0;
940 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
941 /* xcb_sync_create_alarm_value_list_t value_list */
942 xcb_parts
[4].iov_base
= (char *) value_list
;
943 xcb_parts
[4].iov_len
=
944 xcb_sync_create_alarm_value_list_sizeof (value_list
, value_mask
);
946 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
951 xcb_sync_create_alarm (xcb_connection_t
*c
/**< */,
952 xcb_sync_alarm_t id
/**< */,
953 uint32_t value_mask
/**< */,
954 const void *value_list
/**< */)
956 static const xcb_protocol_request_t xcb_req
= {
958 /* ext */ &xcb_sync_id
,
959 /* opcode */ XCB_SYNC_CREATE_ALARM
,
963 struct iovec xcb_parts
[5];
964 xcb_void_cookie_t xcb_ret
;
965 xcb_sync_create_alarm_request_t xcb_out
;
968 xcb_out
.value_mask
= value_mask
;
970 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
971 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
972 xcb_parts
[3].iov_base
= 0;
973 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
974 /* xcb_sync_create_alarm_value_list_t value_list */
975 xcb_parts
[4].iov_base
= (char *) value_list
;
976 xcb_parts
[4].iov_len
=
977 xcb_sync_create_alarm_value_list_sizeof (value_list
, value_mask
);
979 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
984 xcb_sync_create_alarm_aux_checked (xcb_connection_t
*c
/**< */,
985 xcb_sync_alarm_t id
/**< */,
986 uint32_t value_mask
/**< */,
987 const xcb_sync_create_alarm_value_list_t
*value_list
/**< */)
989 static const xcb_protocol_request_t xcb_req
= {
991 /* ext */ &xcb_sync_id
,
992 /* opcode */ XCB_SYNC_CREATE_ALARM
,
996 struct iovec xcb_parts
[5];
997 xcb_void_cookie_t xcb_ret
;
998 xcb_sync_create_alarm_request_t xcb_out
;
1002 xcb_out
.value_mask
= value_mask
;
1004 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1005 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1006 xcb_parts
[3].iov_base
= 0;
1007 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1008 /* xcb_sync_create_alarm_value_list_t value_list */
1009 xcb_parts
[4].iov_len
=
1010 xcb_sync_create_alarm_value_list_serialize (&xcb_aux0
, value_mask
, value_list
);
1011 xcb_parts
[4].iov_base
= xcb_aux0
;
1013 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1019 xcb_sync_create_alarm_aux (xcb_connection_t
*c
/**< */,
1020 xcb_sync_alarm_t id
/**< */,
1021 uint32_t value_mask
/**< */,
1022 const xcb_sync_create_alarm_value_list_t
*value_list
/**< */)
1024 static const xcb_protocol_request_t xcb_req
= {
1026 /* ext */ &xcb_sync_id
,
1027 /* opcode */ XCB_SYNC_CREATE_ALARM
,
1031 struct iovec xcb_parts
[5];
1032 xcb_void_cookie_t xcb_ret
;
1033 xcb_sync_create_alarm_request_t xcb_out
;
1037 xcb_out
.value_mask
= value_mask
;
1039 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1040 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1041 xcb_parts
[3].iov_base
= 0;
1042 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1043 /* xcb_sync_create_alarm_value_list_t value_list */
1044 xcb_parts
[4].iov_len
=
1045 xcb_sync_create_alarm_value_list_serialize (&xcb_aux0
, value_mask
, value_list
);
1046 xcb_parts
[4].iov_base
= xcb_aux0
;
1048 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1054 xcb_sync_change_alarm_value_list_serialize (void **_buffer
/**< */,
1055 uint32_t value_mask
/**< */,
1056 const xcb_sync_change_alarm_value_list_t
*_aux
/**< */)
1058 char *xcb_out
= *_buffer
;
1059 unsigned int xcb_buffer_len
= 0;
1060 unsigned int xcb_align_to
= 0;
1062 unsigned int xcb_pad
= 0;
1063 char xcb_pad0
[3] = {0, 0, 0};
1064 struct iovec xcb_parts
[7];
1065 unsigned int xcb_parts_idx
= 0;
1066 unsigned int xcb_block_len
= 0;
1070 if(value_mask
& XCB_SYNC_CA_COUNTER
) {
1071 /* xcb_sync_change_alarm_value_list_t.counter */
1072 xcb_parts
[xcb_parts_idx
].iov_base
= (char *) &_aux
->counter
;
1073 xcb_block_len
+= sizeof(xcb_sync_counter_t
);
1074 xcb_parts
[xcb_parts_idx
].iov_len
= sizeof(xcb_sync_counter_t
);
1076 xcb_align_to
= ALIGNOF(xcb_sync_counter_t
);
1078 if(value_mask
& XCB_SYNC_CA_VALUE_TYPE
) {
1079 /* xcb_sync_change_alarm_value_list_t.valueType */
1080 xcb_parts
[xcb_parts_idx
].iov_base
= (char *) &_aux
->valueType
;
1081 xcb_block_len
+= sizeof(uint32_t);
1082 xcb_parts
[xcb_parts_idx
].iov_len
= sizeof(uint32_t);
1084 xcb_align_to
= ALIGNOF(uint32_t);
1086 if(value_mask
& XCB_SYNC_CA_VALUE
) {
1087 /* xcb_sync_change_alarm_value_list_t.value */
1088 xcb_parts
[xcb_parts_idx
].iov_base
= (char *) &_aux
->value
;
1089 xcb_block_len
+= sizeof(xcb_sync_int64_t
);
1090 xcb_parts
[xcb_parts_idx
].iov_len
= sizeof(xcb_sync_int64_t
);
1092 xcb_align_to
= ALIGNOF(xcb_sync_int64_t
);
1094 if(value_mask
& XCB_SYNC_CA_TEST_TYPE
) {
1095 /* xcb_sync_change_alarm_value_list_t.testType */
1096 xcb_parts
[xcb_parts_idx
].iov_base
= (char *) &_aux
->testType
;
1097 xcb_block_len
+= sizeof(uint32_t);
1098 xcb_parts
[xcb_parts_idx
].iov_len
= sizeof(uint32_t);
1100 xcb_align_to
= ALIGNOF(uint32_t);
1102 if(value_mask
& XCB_SYNC_CA_DELTA
) {
1103 /* xcb_sync_change_alarm_value_list_t.delta */
1104 xcb_parts
[xcb_parts_idx
].iov_base
= (char *) &_aux
->delta
;
1105 xcb_block_len
+= sizeof(xcb_sync_int64_t
);
1106 xcb_parts
[xcb_parts_idx
].iov_len
= sizeof(xcb_sync_int64_t
);
1108 xcb_align_to
= ALIGNOF(xcb_sync_int64_t
);
1110 if(value_mask
& XCB_SYNC_CA_EVENTS
) {
1111 /* xcb_sync_change_alarm_value_list_t.events */
1112 xcb_parts
[xcb_parts_idx
].iov_base
= (char *) &_aux
->events
;
1113 xcb_block_len
+= sizeof(uint32_t);
1114 xcb_parts
[xcb_parts_idx
].iov_len
= sizeof(uint32_t);
1116 xcb_align_to
= ALIGNOF(uint32_t);
1118 /* insert padding */
1119 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
1120 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
1122 xcb_parts
[xcb_parts_idx
].iov_base
= xcb_pad0
;
1123 xcb_parts
[xcb_parts_idx
].iov_len
= xcb_pad
;
1129 if (NULL
== xcb_out
) {
1130 /* allocate memory */
1131 xcb_out
= malloc(xcb_buffer_len
);
1136 for(i
=0; i
<xcb_parts_idx
; i
++) {
1137 if (0 != xcb_parts
[i
].iov_base
&& 0 != xcb_parts
[i
].iov_len
)
1138 memcpy(xcb_tmp
, xcb_parts
[i
].iov_base
, xcb_parts
[i
].iov_len
);
1139 if (0 != xcb_parts
[i
].iov_len
)
1140 xcb_tmp
+= xcb_parts
[i
].iov_len
;
1143 return xcb_buffer_len
;
1147 xcb_sync_change_alarm_value_list_unpack (const void *_buffer
/**< */,
1148 uint32_t value_mask
/**< */,
1149 xcb_sync_change_alarm_value_list_t
*_aux
/**< */)
1151 char *xcb_tmp
= (char *)_buffer
;
1152 unsigned int xcb_buffer_len
= 0;
1153 unsigned int xcb_block_len
= 0;
1154 unsigned int xcb_pad
= 0;
1155 unsigned int xcb_align_to
= 0;
1158 if(value_mask
& XCB_SYNC_CA_COUNTER
) {
1159 /* xcb_sync_change_alarm_value_list_t.counter */
1160 _aux
->counter
= *(xcb_sync_counter_t
*)xcb_tmp
;
1161 xcb_block_len
+= sizeof(xcb_sync_counter_t
);
1162 xcb_tmp
+= sizeof(xcb_sync_counter_t
);
1163 xcb_align_to
= ALIGNOF(xcb_sync_counter_t
);
1165 if(value_mask
& XCB_SYNC_CA_VALUE_TYPE
) {
1166 /* xcb_sync_change_alarm_value_list_t.valueType */
1167 _aux
->valueType
= *(uint32_t *)xcb_tmp
;
1168 xcb_block_len
+= sizeof(uint32_t);
1169 xcb_tmp
+= sizeof(uint32_t);
1170 xcb_align_to
= ALIGNOF(uint32_t);
1172 if(value_mask
& XCB_SYNC_CA_VALUE
) {
1173 /* xcb_sync_change_alarm_value_list_t.value */
1174 _aux
->value
= *(xcb_sync_int64_t
*)xcb_tmp
;
1175 xcb_block_len
+= sizeof(xcb_sync_int64_t
);
1176 xcb_tmp
+= sizeof(xcb_sync_int64_t
);
1177 xcb_align_to
= ALIGNOF(xcb_sync_int64_t
);
1179 if(value_mask
& XCB_SYNC_CA_TEST_TYPE
) {
1180 /* xcb_sync_change_alarm_value_list_t.testType */
1181 _aux
->testType
= *(uint32_t *)xcb_tmp
;
1182 xcb_block_len
+= sizeof(uint32_t);
1183 xcb_tmp
+= sizeof(uint32_t);
1184 xcb_align_to
= ALIGNOF(uint32_t);
1186 if(value_mask
& XCB_SYNC_CA_DELTA
) {
1187 /* xcb_sync_change_alarm_value_list_t.delta */
1188 _aux
->delta
= *(xcb_sync_int64_t
*)xcb_tmp
;
1189 xcb_block_len
+= sizeof(xcb_sync_int64_t
);
1190 xcb_tmp
+= sizeof(xcb_sync_int64_t
);
1191 xcb_align_to
= ALIGNOF(xcb_sync_int64_t
);
1193 if(value_mask
& XCB_SYNC_CA_EVENTS
) {
1194 /* xcb_sync_change_alarm_value_list_t.events */
1195 _aux
->events
= *(uint32_t *)xcb_tmp
;
1196 xcb_block_len
+= sizeof(uint32_t);
1197 xcb_tmp
+= sizeof(uint32_t);
1198 xcb_align_to
= ALIGNOF(uint32_t);
1200 /* insert padding */
1201 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
1202 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
1209 return xcb_buffer_len
;
1213 xcb_sync_change_alarm_value_list_sizeof (const void *_buffer
/**< */,
1214 uint32_t value_mask
/**< */)
1216 xcb_sync_change_alarm_value_list_t _aux
;
1217 return xcb_sync_change_alarm_value_list_unpack(_buffer
, value_mask
, &_aux
);
1221 xcb_sync_change_alarm_checked (xcb_connection_t
*c
/**< */,
1222 xcb_sync_alarm_t id
/**< */,
1223 uint32_t value_mask
/**< */,
1224 const void *value_list
/**< */)
1226 static const xcb_protocol_request_t xcb_req
= {
1228 /* ext */ &xcb_sync_id
,
1229 /* opcode */ XCB_SYNC_CHANGE_ALARM
,
1233 struct iovec xcb_parts
[5];
1234 xcb_void_cookie_t xcb_ret
;
1235 xcb_sync_change_alarm_request_t xcb_out
;
1238 xcb_out
.value_mask
= value_mask
;
1240 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1241 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1242 xcb_parts
[3].iov_base
= 0;
1243 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1244 /* xcb_sync_change_alarm_value_list_t value_list */
1245 xcb_parts
[4].iov_base
= (char *) value_list
;
1246 xcb_parts
[4].iov_len
=
1247 xcb_sync_change_alarm_value_list_sizeof (value_list
, value_mask
);
1249 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1254 xcb_sync_change_alarm (xcb_connection_t
*c
/**< */,
1255 xcb_sync_alarm_t id
/**< */,
1256 uint32_t value_mask
/**< */,
1257 const void *value_list
/**< */)
1259 static const xcb_protocol_request_t xcb_req
= {
1261 /* ext */ &xcb_sync_id
,
1262 /* opcode */ XCB_SYNC_CHANGE_ALARM
,
1266 struct iovec xcb_parts
[5];
1267 xcb_void_cookie_t xcb_ret
;
1268 xcb_sync_change_alarm_request_t xcb_out
;
1271 xcb_out
.value_mask
= value_mask
;
1273 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1274 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1275 xcb_parts
[3].iov_base
= 0;
1276 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1277 /* xcb_sync_change_alarm_value_list_t value_list */
1278 xcb_parts
[4].iov_base
= (char *) value_list
;
1279 xcb_parts
[4].iov_len
=
1280 xcb_sync_change_alarm_value_list_sizeof (value_list
, value_mask
);
1282 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1287 xcb_sync_change_alarm_aux_checked (xcb_connection_t
*c
/**< */,
1288 xcb_sync_alarm_t id
/**< */,
1289 uint32_t value_mask
/**< */,
1290 const xcb_sync_change_alarm_value_list_t
*value_list
/**< */)
1292 static const xcb_protocol_request_t xcb_req
= {
1294 /* ext */ &xcb_sync_id
,
1295 /* opcode */ XCB_SYNC_CHANGE_ALARM
,
1299 struct iovec xcb_parts
[5];
1300 xcb_void_cookie_t xcb_ret
;
1301 xcb_sync_change_alarm_request_t xcb_out
;
1305 xcb_out
.value_mask
= value_mask
;
1307 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1308 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1309 xcb_parts
[3].iov_base
= 0;
1310 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1311 /* xcb_sync_change_alarm_value_list_t value_list */
1312 xcb_parts
[4].iov_len
=
1313 xcb_sync_change_alarm_value_list_serialize (&xcb_aux0
, value_mask
, value_list
);
1314 xcb_parts
[4].iov_base
= xcb_aux0
;
1316 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1322 xcb_sync_change_alarm_aux (xcb_connection_t
*c
/**< */,
1323 xcb_sync_alarm_t id
/**< */,
1324 uint32_t value_mask
/**< */,
1325 const xcb_sync_change_alarm_value_list_t
*value_list
/**< */)
1327 static const xcb_protocol_request_t xcb_req
= {
1329 /* ext */ &xcb_sync_id
,
1330 /* opcode */ XCB_SYNC_CHANGE_ALARM
,
1334 struct iovec xcb_parts
[5];
1335 xcb_void_cookie_t xcb_ret
;
1336 xcb_sync_change_alarm_request_t xcb_out
;
1340 xcb_out
.value_mask
= value_mask
;
1342 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1343 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1344 xcb_parts
[3].iov_base
= 0;
1345 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1346 /* xcb_sync_change_alarm_value_list_t value_list */
1347 xcb_parts
[4].iov_len
=
1348 xcb_sync_change_alarm_value_list_serialize (&xcb_aux0
, value_mask
, value_list
);
1349 xcb_parts
[4].iov_base
= xcb_aux0
;
1351 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1357 xcb_sync_destroy_alarm_checked (xcb_connection_t
*c
/**< */,
1358 xcb_sync_alarm_t alarm
/**< */)
1360 static const xcb_protocol_request_t xcb_req
= {
1362 /* ext */ &xcb_sync_id
,
1363 /* opcode */ XCB_SYNC_DESTROY_ALARM
,
1367 struct iovec xcb_parts
[4];
1368 xcb_void_cookie_t xcb_ret
;
1369 xcb_sync_destroy_alarm_request_t xcb_out
;
1371 xcb_out
.alarm
= alarm
;
1373 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1374 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1375 xcb_parts
[3].iov_base
= 0;
1376 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1378 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1383 xcb_sync_destroy_alarm (xcb_connection_t
*c
/**< */,
1384 xcb_sync_alarm_t alarm
/**< */)
1386 static const xcb_protocol_request_t xcb_req
= {
1388 /* ext */ &xcb_sync_id
,
1389 /* opcode */ XCB_SYNC_DESTROY_ALARM
,
1393 struct iovec xcb_parts
[4];
1394 xcb_void_cookie_t xcb_ret
;
1395 xcb_sync_destroy_alarm_request_t xcb_out
;
1397 xcb_out
.alarm
= alarm
;
1399 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1400 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1401 xcb_parts
[3].iov_base
= 0;
1402 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1404 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1408 xcb_sync_query_alarm_cookie_t
1409 xcb_sync_query_alarm (xcb_connection_t
*c
/**< */,
1410 xcb_sync_alarm_t alarm
/**< */)
1412 static const xcb_protocol_request_t xcb_req
= {
1414 /* ext */ &xcb_sync_id
,
1415 /* opcode */ XCB_SYNC_QUERY_ALARM
,
1419 struct iovec xcb_parts
[4];
1420 xcb_sync_query_alarm_cookie_t xcb_ret
;
1421 xcb_sync_query_alarm_request_t xcb_out
;
1423 xcb_out
.alarm
= alarm
;
1425 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1426 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1427 xcb_parts
[3].iov_base
= 0;
1428 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1430 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1434 xcb_sync_query_alarm_cookie_t
1435 xcb_sync_query_alarm_unchecked (xcb_connection_t
*c
/**< */,
1436 xcb_sync_alarm_t alarm
/**< */)
1438 static const xcb_protocol_request_t xcb_req
= {
1440 /* ext */ &xcb_sync_id
,
1441 /* opcode */ XCB_SYNC_QUERY_ALARM
,
1445 struct iovec xcb_parts
[4];
1446 xcb_sync_query_alarm_cookie_t xcb_ret
;
1447 xcb_sync_query_alarm_request_t xcb_out
;
1449 xcb_out
.alarm
= alarm
;
1451 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1452 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1453 xcb_parts
[3].iov_base
= 0;
1454 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1456 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1460 xcb_sync_query_alarm_reply_t
*
1461 xcb_sync_query_alarm_reply (xcb_connection_t
*c
/**< */,
1462 xcb_sync_query_alarm_cookie_t cookie
/**< */,
1463 xcb_generic_error_t
**e
/**< */)
1465 return (xcb_sync_query_alarm_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
1469 xcb_sync_set_priority_checked (xcb_connection_t
*c
/**< */,
1470 uint32_t id
/**< */,
1471 int32_t priority
/**< */)
1473 static const xcb_protocol_request_t xcb_req
= {
1475 /* ext */ &xcb_sync_id
,
1476 /* opcode */ XCB_SYNC_SET_PRIORITY
,
1480 struct iovec xcb_parts
[4];
1481 xcb_void_cookie_t xcb_ret
;
1482 xcb_sync_set_priority_request_t xcb_out
;
1485 xcb_out
.priority
= priority
;
1487 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1488 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1489 xcb_parts
[3].iov_base
= 0;
1490 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1492 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1497 xcb_sync_set_priority (xcb_connection_t
*c
/**< */,
1498 uint32_t id
/**< */,
1499 int32_t priority
/**< */)
1501 static const xcb_protocol_request_t xcb_req
= {
1503 /* ext */ &xcb_sync_id
,
1504 /* opcode */ XCB_SYNC_SET_PRIORITY
,
1508 struct iovec xcb_parts
[4];
1509 xcb_void_cookie_t xcb_ret
;
1510 xcb_sync_set_priority_request_t xcb_out
;
1513 xcb_out
.priority
= priority
;
1515 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1516 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1517 xcb_parts
[3].iov_base
= 0;
1518 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1520 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1524 xcb_sync_get_priority_cookie_t
1525 xcb_sync_get_priority (xcb_connection_t
*c
/**< */,
1526 uint32_t id
/**< */)
1528 static const xcb_protocol_request_t xcb_req
= {
1530 /* ext */ &xcb_sync_id
,
1531 /* opcode */ XCB_SYNC_GET_PRIORITY
,
1535 struct iovec xcb_parts
[4];
1536 xcb_sync_get_priority_cookie_t xcb_ret
;
1537 xcb_sync_get_priority_request_t xcb_out
;
1541 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1542 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1543 xcb_parts
[3].iov_base
= 0;
1544 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1546 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1550 xcb_sync_get_priority_cookie_t
1551 xcb_sync_get_priority_unchecked (xcb_connection_t
*c
/**< */,
1552 uint32_t id
/**< */)
1554 static const xcb_protocol_request_t xcb_req
= {
1556 /* ext */ &xcb_sync_id
,
1557 /* opcode */ XCB_SYNC_GET_PRIORITY
,
1561 struct iovec xcb_parts
[4];
1562 xcb_sync_get_priority_cookie_t xcb_ret
;
1563 xcb_sync_get_priority_request_t xcb_out
;
1567 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1568 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1569 xcb_parts
[3].iov_base
= 0;
1570 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1572 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1576 xcb_sync_get_priority_reply_t
*
1577 xcb_sync_get_priority_reply (xcb_connection_t
*c
/**< */,
1578 xcb_sync_get_priority_cookie_t cookie
/**< */,
1579 xcb_generic_error_t
**e
/**< */)
1581 return (xcb_sync_get_priority_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
1585 xcb_sync_create_fence_checked (xcb_connection_t
*c
/**< */,
1586 xcb_drawable_t drawable
/**< */,
1587 xcb_sync_fence_t fence
/**< */,
1588 uint8_t initially_triggered
/**< */)
1590 static const xcb_protocol_request_t xcb_req
= {
1592 /* ext */ &xcb_sync_id
,
1593 /* opcode */ XCB_SYNC_CREATE_FENCE
,
1597 struct iovec xcb_parts
[4];
1598 xcb_void_cookie_t xcb_ret
;
1599 xcb_sync_create_fence_request_t xcb_out
;
1601 xcb_out
.drawable
= drawable
;
1602 xcb_out
.fence
= fence
;
1603 xcb_out
.initially_triggered
= initially_triggered
;
1605 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1606 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1607 xcb_parts
[3].iov_base
= 0;
1608 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1610 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1615 xcb_sync_create_fence (xcb_connection_t
*c
/**< */,
1616 xcb_drawable_t drawable
/**< */,
1617 xcb_sync_fence_t fence
/**< */,
1618 uint8_t initially_triggered
/**< */)
1620 static const xcb_protocol_request_t xcb_req
= {
1622 /* ext */ &xcb_sync_id
,
1623 /* opcode */ XCB_SYNC_CREATE_FENCE
,
1627 struct iovec xcb_parts
[4];
1628 xcb_void_cookie_t xcb_ret
;
1629 xcb_sync_create_fence_request_t xcb_out
;
1631 xcb_out
.drawable
= drawable
;
1632 xcb_out
.fence
= fence
;
1633 xcb_out
.initially_triggered
= initially_triggered
;
1635 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1636 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1637 xcb_parts
[3].iov_base
= 0;
1638 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1640 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1645 xcb_sync_trigger_fence_checked (xcb_connection_t
*c
/**< */,
1646 xcb_sync_fence_t fence
/**< */)
1648 static const xcb_protocol_request_t xcb_req
= {
1650 /* ext */ &xcb_sync_id
,
1651 /* opcode */ XCB_SYNC_TRIGGER_FENCE
,
1655 struct iovec xcb_parts
[4];
1656 xcb_void_cookie_t xcb_ret
;
1657 xcb_sync_trigger_fence_request_t xcb_out
;
1659 xcb_out
.fence
= fence
;
1661 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1662 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1663 xcb_parts
[3].iov_base
= 0;
1664 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1666 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1671 xcb_sync_trigger_fence (xcb_connection_t
*c
/**< */,
1672 xcb_sync_fence_t fence
/**< */)
1674 static const xcb_protocol_request_t xcb_req
= {
1676 /* ext */ &xcb_sync_id
,
1677 /* opcode */ XCB_SYNC_TRIGGER_FENCE
,
1681 struct iovec xcb_parts
[4];
1682 xcb_void_cookie_t xcb_ret
;
1683 xcb_sync_trigger_fence_request_t xcb_out
;
1685 xcb_out
.fence
= fence
;
1687 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1688 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1689 xcb_parts
[3].iov_base
= 0;
1690 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1692 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1697 xcb_sync_reset_fence_checked (xcb_connection_t
*c
/**< */,
1698 xcb_sync_fence_t fence
/**< */)
1700 static const xcb_protocol_request_t xcb_req
= {
1702 /* ext */ &xcb_sync_id
,
1703 /* opcode */ XCB_SYNC_RESET_FENCE
,
1707 struct iovec xcb_parts
[4];
1708 xcb_void_cookie_t xcb_ret
;
1709 xcb_sync_reset_fence_request_t xcb_out
;
1711 xcb_out
.fence
= fence
;
1713 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1714 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1715 xcb_parts
[3].iov_base
= 0;
1716 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1718 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1723 xcb_sync_reset_fence (xcb_connection_t
*c
/**< */,
1724 xcb_sync_fence_t fence
/**< */)
1726 static const xcb_protocol_request_t xcb_req
= {
1728 /* ext */ &xcb_sync_id
,
1729 /* opcode */ XCB_SYNC_RESET_FENCE
,
1733 struct iovec xcb_parts
[4];
1734 xcb_void_cookie_t xcb_ret
;
1735 xcb_sync_reset_fence_request_t xcb_out
;
1737 xcb_out
.fence
= fence
;
1739 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1740 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1741 xcb_parts
[3].iov_base
= 0;
1742 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1744 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1749 xcb_sync_destroy_fence_checked (xcb_connection_t
*c
/**< */,
1750 xcb_sync_fence_t fence
/**< */)
1752 static const xcb_protocol_request_t xcb_req
= {
1754 /* ext */ &xcb_sync_id
,
1755 /* opcode */ XCB_SYNC_DESTROY_FENCE
,
1759 struct iovec xcb_parts
[4];
1760 xcb_void_cookie_t xcb_ret
;
1761 xcb_sync_destroy_fence_request_t xcb_out
;
1763 xcb_out
.fence
= fence
;
1765 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1766 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1767 xcb_parts
[3].iov_base
= 0;
1768 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1770 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1775 xcb_sync_destroy_fence (xcb_connection_t
*c
/**< */,
1776 xcb_sync_fence_t fence
/**< */)
1778 static const xcb_protocol_request_t xcb_req
= {
1780 /* ext */ &xcb_sync_id
,
1781 /* opcode */ XCB_SYNC_DESTROY_FENCE
,
1785 struct iovec xcb_parts
[4];
1786 xcb_void_cookie_t xcb_ret
;
1787 xcb_sync_destroy_fence_request_t xcb_out
;
1789 xcb_out
.fence
= fence
;
1791 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1792 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1793 xcb_parts
[3].iov_base
= 0;
1794 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1796 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1800 xcb_sync_query_fence_cookie_t
1801 xcb_sync_query_fence (xcb_connection_t
*c
/**< */,
1802 xcb_sync_fence_t fence
/**< */)
1804 static const xcb_protocol_request_t xcb_req
= {
1806 /* ext */ &xcb_sync_id
,
1807 /* opcode */ XCB_SYNC_QUERY_FENCE
,
1811 struct iovec xcb_parts
[4];
1812 xcb_sync_query_fence_cookie_t xcb_ret
;
1813 xcb_sync_query_fence_request_t xcb_out
;
1815 xcb_out
.fence
= fence
;
1817 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1818 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1819 xcb_parts
[3].iov_base
= 0;
1820 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1822 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1826 xcb_sync_query_fence_cookie_t
1827 xcb_sync_query_fence_unchecked (xcb_connection_t
*c
/**< */,
1828 xcb_sync_fence_t fence
/**< */)
1830 static const xcb_protocol_request_t xcb_req
= {
1832 /* ext */ &xcb_sync_id
,
1833 /* opcode */ XCB_SYNC_QUERY_FENCE
,
1837 struct iovec xcb_parts
[4];
1838 xcb_sync_query_fence_cookie_t xcb_ret
;
1839 xcb_sync_query_fence_request_t xcb_out
;
1841 xcb_out
.fence
= fence
;
1843 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1844 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1845 xcb_parts
[3].iov_base
= 0;
1846 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1848 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1852 xcb_sync_query_fence_reply_t
*
1853 xcb_sync_query_fence_reply (xcb_connection_t
*c
/**< */,
1854 xcb_sync_query_fence_cookie_t cookie
/**< */,
1855 xcb_generic_error_t
**e
/**< */)
1857 return (xcb_sync_query_fence_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
1861 xcb_sync_await_fence_sizeof (const void *_buffer
/**< */,
1862 uint32_t fence_list_len
/**< */)
1864 char *xcb_tmp
= (char *)_buffer
;
1865 unsigned int xcb_buffer_len
= 0;
1866 unsigned int xcb_block_len
= 0;
1867 unsigned int xcb_pad
= 0;
1868 unsigned int xcb_align_to
= 0;
1871 xcb_block_len
+= sizeof(xcb_sync_await_fence_request_t
);
1872 xcb_tmp
+= xcb_block_len
;
1873 xcb_buffer_len
+= xcb_block_len
;
1876 xcb_block_len
+= fence_list_len
* sizeof(xcb_sync_fence_t
);
1877 xcb_tmp
+= xcb_block_len
;
1878 xcb_align_to
= ALIGNOF(xcb_sync_fence_t
);
1879 /* insert padding */
1880 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
1881 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
1888 return xcb_buffer_len
;
1892 xcb_sync_await_fence_checked (xcb_connection_t
*c
/**< */,
1893 uint32_t fence_list_len
/**< */,
1894 const xcb_sync_fence_t
*fence_list
/**< */)
1896 static const xcb_protocol_request_t xcb_req
= {
1898 /* ext */ &xcb_sync_id
,
1899 /* opcode */ XCB_SYNC_AWAIT_FENCE
,
1903 struct iovec xcb_parts
[6];
1904 xcb_void_cookie_t xcb_ret
;
1905 xcb_sync_await_fence_request_t xcb_out
;
1908 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1909 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1910 xcb_parts
[3].iov_base
= 0;
1911 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1912 /* xcb_sync_fence_t fence_list */
1913 xcb_parts
[4].iov_base
= (char *) fence_list
;
1914 xcb_parts
[4].iov_len
= fence_list_len
* sizeof(xcb_sync_fence_t
);
1915 xcb_parts
[5].iov_base
= 0;
1916 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
1918 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1923 xcb_sync_await_fence (xcb_connection_t
*c
/**< */,
1924 uint32_t fence_list_len
/**< */,
1925 const xcb_sync_fence_t
*fence_list
/**< */)
1927 static const xcb_protocol_request_t xcb_req
= {
1929 /* ext */ &xcb_sync_id
,
1930 /* opcode */ XCB_SYNC_AWAIT_FENCE
,
1934 struct iovec xcb_parts
[6];
1935 xcb_void_cookie_t xcb_ret
;
1936 xcb_sync_await_fence_request_t xcb_out
;
1939 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1940 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1941 xcb_parts
[3].iov_base
= 0;
1942 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1943 /* xcb_sync_fence_t fence_list */
1944 xcb_parts
[4].iov_base
= (char *) fence_list
;
1945 xcb_parts
[4].iov_len
= fence_list_len
* sizeof(xcb_sync_fence_t
);
1946 xcb_parts
[5].iov_base
= 0;
1947 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
1949 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);