xcb_sync_query_fence(3)

πŸ“¦
version 1.17.0 Β· 4 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ xcb_sync_query_fence ✨

okay bestie, welcome to xcb_sync_query_fence from the XCB Requests corner of the X world πŸ’– this one lives in the libxcb manual, and we're gonna read it together like it's a group chat thread. no skimming, no skipping, we're doing the whole thing 🫢


🌸 NAME 🌸

xcb_sync_query_fence β€” and that's it. fr fr, the description line is literally empty in the original. she's mysterious. she's giving main character energy with no caption πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

first thing you need, always:

#include <xcb/sync.h>

πŸ’« Request function πŸ’«

xcb_sync_query_fence_cookie_t
       xcb_sync_query_fence(xcb_connection_t *conn,
       xcb_sync_fence_t fence);

πŸ’« Reply datastructure πŸ’«

typedef struct xcb_sync_query_fence_reply_t {
    uint8_t  response_type;
    uint8_t  pad0;
    uint16_t sequence;
    uint32_t length;
    uint8_t  triggered;
    uint8_t  pad1[23];
} xcb_sync_query_fence_reply_t;

πŸ’« Reply function πŸ’«

xcb_sync_query_fence_reply_t
       *xcb_sync_query_fence_reply(xcb_connection_t *conn,
       xcb_sync_query_fence_cookie_t cookie, xcb_generic_error_t **e);

so you fire off the request, you get a cookie back, and then you trade that cookie in with the reply function. iconic two-step. periodt ✨


πŸ¦‹ REQUEST ARGUMENTS πŸ¦‹

  • conn β€” the XCB connection to X11. your lil lifeline to the server, she's everything πŸ’œ
  • fence β€” TODO: NOT YET DOCUMENTED. yeah. the docs really said "we'll get to it" 😭 no cap, that's what it says.

🌈 REPLY FIELDS 🌈

  • response_type β€” the type of this reply, which in this case is XCB_SYNC_QUERY_FENCE. this field also shows up in the xcb_generic_reply_t, and it's literally how you tell your replies apart from each other, so don't sleep on it πŸ‘‘
  • sequence β€” the sequence number of the last request that got processed by the X11 server. the receipts, basically 🧾
  • length β€” how long the reply is, in words. and yes bestie, a word here is 4 bytes. that's just the rules πŸ’…
  • triggered β€” TODO: NOT YET DOCUMENTED. another one. she said "mystery" and meant it πŸ™ˆ

πŸ’€ DESCRIPTION πŸ’€

there is genuinely nothing here. the DESCRIPTION section is empty in the original. not a single word. it's giving silence, it's giving "read the rest and figure it out" 😭 we move.


⭐ RETURN VALUE ⭐

you get back an xcb_sync_query_fence_cookie_t πŸͺ and here's the important bit: errors have to be handled when you call the reply function, xcb_sync_query_fence_reply.

but if you'd rather handle your errors in the event loop instead, use xcb_sync_query_fence_unchecked. see xcb-requests(3) for the deets on that whole situation πŸ”₯


πŸ”₯ ERRORS πŸ”₯

this request does never generate any errors. not one. zero. she's a good girl, she behaves πŸ’–

🌸 SEE ALSO 🌸

nothing listed. the SEE ALSO section is empty, so there's nobody to introduce her to πŸ₯²


🫢 AUTHOR 🫢

Generated from sync.xml. Contact xcb@lists.freedesktop.org for corrections and improvements β€” they literally put the address right there so you can slide into their inbox with fixes, and honestly? slay that they're open to it πŸ’Œ


okay that's the whole page, bestie, you ate it up 🌟 and a cute lil sign-off for the very end: this was X Version 11, libxcb 1.17.0, page xcb_sync_query_fence(3) β€” go forth and query those fences, mwah πŸ’…βœ¨πŸŽ€