xcb_dri2_wait_sbc(3)
β¨ xcb_dri2_wait_sbc β¨
okay bestie, pull up a chair π«Ά because today we're reading xcb_dri2_wait_sbc(3), straight out of the XCB Requests collection. it's a lil XCB request from the dri2 era, and honestly? the docs are giving mysterious. we're gonna walk through every single line together, no skipping, periodt. π
πΈ NAME πΈ
xcb_dri2_wait_sbc β and thenβ¦ nothing. literally nothing. the description is blank. the manpage just trails off into the void like my attention span during a 3-hour lecture. π that's not me being lazy, that's just what's actually written. iconic honestly.
π SYNOPSIS π
first thing you gotta do is pull in the header:
#include <xcb/dri2.h>
Request function
here's the actual request, in all its glory:
xcb_dri2_wait_sbc_cookie_t xcb_dri2_wait_sbc(xcb_connection_t *conn,
xcb_drawable_t drawable, uint32_t target_sbc_hi,
uint32_t target_sbc_lo);
Reply datastructure
and here's the struct that comes back at you:
typedef struct xcb_dri2_wait_sbc_reply_t {
uint8_t response_type;
uint8_t pad0;
uint16_t sequence;
uint32_t length;
uint32_t ust_hi;
uint32_t ust_lo;
uint32_t msc_hi;
uint32_t msc_lo;
uint32_t sbc_hi;
uint32_t sbc_lo;
} xcb_dri2_wait_sbc_reply_t;
Reply function
and the function that actually hands you that struct:
xcb_dri2_wait_sbc_reply_t
*xcb_dri2_wait_sbc_reply(xcb_connection_t *conn,
xcb_dri2_wait_sbc_cookie_t cookie, xcb_generic_error_t **e);
π¦ REQUEST ARGUMENTS π¦
okay so here's what you're passing in:
connβ your XCB connection to X11. the whole reason we're here, the main character of every XCB function tbh. πdrawableβTODO: NOT YET DOCUMENTED.yeah. they said "we'll get to it" and then never did. πtarget_sbc_hiβTODO: NOT YET DOCUMENTED.same vibe. π«target_sbc_loβTODO: NOT YET DOCUMENTED.the trilogy of unfinished business, fr fr.
π REPLY FIELDS π
here's everything that comes back in the reply struct:
response_typeβ the type of this reply, and for this one it'sXCB_DRI2_WAIT_SBC. this field also lives in thexcb_generic_reply_t, so you can use it to tell your replies apart from each other. it's like a name tag at a party but for structs. πsequenceβ the sequence number of the last request processed by the X11 server. tracking numbers but make it β¨serverβ¨.lengthβ the length of the reply, in words. and heads up, a word here is 4 bytes. not a dictionary word. computer word. iykyk. π§ust_hiβTODO: NOT YET DOCUMENTED.ust_loβTODO: NOT YET DOCUMENTED.msc_hiβTODO: NOT YET DOCUMENTED.msc_loβTODO: NOT YET DOCUMENTED.sbc_hiβTODO: NOT YET DOCUMENTED.sbc_loβTODO: NOT YET DOCUMENTED.
so many hi/lo pairs and so little documentation. it's giving unsolved mystery podcast. π
π DESCRIPTION π
literally nothing here. the DESCRIPTION section is empty. bestie the void is voiding. π
β RETURN VALUE β
it returns an xcb_dri2_wait_sbc_cookie_t. πͺ and listen β errors have to be handled when you call the reply function xcb_dri2_wait_sbc_reply. so you don't get to just ignore them, you gotta deal with them at reply time.
but wait, there's a plot twist β¨ β if you'd rather handle errors in the event loop instead, use xcb_dri2_wait_sbc_unchecked. see xcb-requests(3) for all the deets on how that works.
π ERRORS π
good news bestie: this request never generates any errors. not a single one. it's the low-drama friend of the group chat. no cap. ποΈ
π₯ SEE ALSO π₯
this section is empty. no cross-references listed. it's giving "i have no friends" but in manpage form. π (not true tho, xcb-requests(3) got mentioned up in RETURN VALUE, so go read that one π)
π AUTHOR π
generated from dri2.xml. and if you spot something wrong or wanna make it better, contact xcb@lists.freedesktop.org for corrections and improvements. they're literally asking for feedback, so if you find something, say something. π«Ά
and that's the whole page, bestie! π
this one came to you from X Version 11 and libxcb 1.17.0, and the manual page itself is xcb_dri2_wait_sbc(3). now go forth and handle those errors in the event loop, mwah. πΈβ¨π
π¦ where this page comes from
- alpine 3.22: libxcb-doc 1.17.0-r0 Β· MIT
- alpine 3.23: libxcb-doc 1.17.0-r1 Β· MIT
- alpine 3.24: libxcb-doc 1.17.0-r2 Β· MIT
- arch rolling: libxcb 1.17.0-1 Β· X11
- centos-stream 10: libxcb-devel 1.17.0-3.el10 Β· X11
- debian trixie: libxcb-doc 1.17.0-2
- fedora 43: libxcb-devel 1.17.0-6.fc43 Β· X11
- fedora 43: libxcb-devel 1.17.0-6.fc43 Β· X11
- fedora 44: libxcb-devel 1.17.0-7.fc44 Β· X11
- fedora 44: libxcb-devel 1.17.0-7.fc44 Β· X11
- nixpkgs unstable: libxcb 1.17.0
- opensuse-leap 16.0: libxcb-devel-doc 1.17.0-160000.2.2 Β· MIT
- ubuntu questing: libxcb-doc 1.17.0-2build1
- ubuntu resolute: libxcb-doc 1.17.0-2ubuntu1
- ubuntu stonking: libxcb-doc 1.17.0-2ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms