QB_LOOP_JOB_DEL(3)

πŸ’– QB_LOOP_JOB_DEL πŸ’–

okay bestie, so we're deep in the libqb programmer's manual rn, and this one is qb_loop_job_del(3) β€” yes, the mainloop girlies' fave. buckle up πŸŽ€


✨ NAME ✨

qb_loop_job_del β€” Delete a job from the mainloop. bye bestie, you're cancelled πŸ’…


🌸 SYNOPSIS 🌸

#include <qb/qbloop.h>

int32_t qb_loop_job_del(
    struct qb_loop          *l,            /* pointer to the loop instance */
    enum qb_loop_priority    p,            /* the priority */
    void                    *data,         /* user data passed into the dispatch function */
    qb_loop_job_dispatch_fn  dispatch_fn   /* callback function */
);

look at her. four little args. so demure, so mindful. πŸ¦‹


🫢 PARAMS 🫢

  • l β€” pointer to the loop instance. like, the actual mainloop you're messing with.
  • p β€” the priority. lowkey important, we'll get to that.
  • data β€” user data passed into the dispatch function. your little payload, your little vibe carrier.
  • dispatch_fn β€” callback function. the thing that would've run, if it hadn't been so brutally deleted πŸ’€

πŸ’… DESCRIPTION πŸ’…

This will try to delete the job β€” but only if it hasn't run yet. so if it already ran? too late babe, it's gone, nothing to delete. the way that this function is literally just "if you're not early, you're late" 😭


πŸ—οΈ STRUCTURES πŸ—οΈ

here's the priority enum, and yes she's giving iconic:

enum qb_loop_priority {
      QB_LOOP_LOW;
      QB_LOOP_MED;
      QB_LOOP_HIGH;
};

QB_LOOP_LOW, QB_LOOP_MED, QB_LOOP_HIGH β€” pick your fighter ✨


⭐ RETURN VALUE ⭐

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

so like, 0 means slay, -errno means it's giving tragedy πŸ™ˆ


πŸ‘‘ NOTE πŸ‘‘

this will remove the first job that matches the parameters (priority, data, dispatch_fn).

not the second one. not all of them. the first one. periodt.


🌈 SEE ALSO 🌈

the whole friend group, fr fr:


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


and that's the whole page bestie!! this lil masterpiece lives in the libqb manual, dated 2025-09-16, brought to you by LIBQB β€” and it's called QB_LOOP_JOB_DEL(3) in case the header up top didn't already give that away πŸ’–βœ¨πŸŽ€ ily, go delete some jobs (respectfully) πŸ¦‹πŸ’…

πŸ“¦ where this page comes from