QB_LOOP_POLL_MOD(3)

πŸ’… QB_LOOP_POLL_MOD πŸ’…

okay bestie, we're in the libqb Programmer's Manual and today's main character is qb_loop_poll_mod(3) β€” the one that modifies a poll job. that's it. that's the whole name. slay.


✨ NAME ✨

qb_loop_poll_mod β€” Modify a poll job. yes girl, modify. we're not adding, we're not deleting, we're editing the whole thing like it's a TikTok draft. 🎬


🌸 SYNOPSIS 🌸

#include <qb/qbloop.h>

int32_t qb_loop_poll_mod(
    qb_loop_t                *l,            /* pointer to the loop instance */
    enum qb_loop_priority     p,            /* the priority */
    int32_t                   fd,           /* file descriptor. */
    int32_t                   events,       /* (POLLIN|POLLOUT) etc .... */
    void                     *data,         /* user data passed into the dispatch function */
    qb_loop_poll_dispatch_fn  dispatch_fn   /* callback function */
);

look at those comments. the original author left us little sticky notes and honestly? πŸ₯Ί we love a documented signature. keep them, they're iconic.


πŸŽ€ PARAMS πŸŽ€

  • l β€” pointer to the loop instance. the loop. the whole vibe container. πŸ‘‘
  • p β€” the priority. which tier of the priority enum you're repping.
  • fd β€” file descriptor. yes with a period in the original, we keep the period, we don't question the period. πŸ’€
  • events β€” (POLLIN|POLLOUT) etc .... the etc is doing so much heavy lifting here and i respect it.
  • data β€” user data passed into the dispatch function. your lil payload. your lil gift. 🎁
  • dispatch_fn β€” callback function. the function that gets called back. (that's what callback means bestie, i'm not being shady i promise 🫢)

πŸ¦‹ DESCRIPTION πŸ¦‹

that's it. that's the section. the original just went straight from DESCRIPTION into STRUCTURES with absolutely nothing in between, and honestly? not me shipping an empty DESCRIPTION section. the audacity. the confidence. we love a mysterious queen who says nothing and moves on. πŸ’…

so, like the original: nothing here. moving on. periodt.


🌈 STRUCTURES 🌈

enum qb_loop_priority {
      QB_LOOP_LOW;
      QB_LOOP_MED;
      QB_LOOP_HIGH;
};

three tiers of priority. QB_LOOP_LOW, QB_LOOP_MED, QB_LOOP_HIGH. low, med, high. it's giving tier list. it's giving ranked choice. πŸ”₯


⭐ RETURN VALUE ⭐

status (0 == ok, -errno == failure)

so: 0 and you're thriving ✨. -errno and it's giving 😭. that's the whole vibe check.


πŸ’– SEE ALSO πŸ’–

your recommended-for-you page, bestie:

all seventeen of them. no i did not skip any. we do not gatekeep on this account. 🫢


Copyright (C) 2010-2020 Red Hat, Inc.


reminder bestie: everything above is verbatim-faithful to the original page. i added sparkle, not opinions about how the function behaves. no cap. 🧚

and that's the whole page!! this was LIBQB, dated 2025-09-16, and it's QB_LOOP_POLL_MOD(3) β€” thanks for reading my little manual page bestie, go modify a poll job and slay πŸ’œπŸŒΈβœ¨

πŸ“¦ where this page comes from