qb_loop_job_add(3)

qb_loop_job_add3

Add a job to the mainloop.

Usage

#include <qb/qbloop.h>

int32_t qb_loop_job_add(
    qb_loop_t               *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 */
);

Params

l pointer to the loop instance

p the priority

data user data passed into the dispatch function

dispatch_fn callback function

Overview

This is run in the next cycle of the loop.

Structures

enum qb_loop_priority {
      QB_LOOP_LOW;
      QB_LOOP_MED;
      QB_LOOP_HIGH;
};

Return value

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

Note

it is a one-shot job.

Releases

4 releases since Debian 11 (Bullseye); the text changed 3 times.

  1. 11
  2. 12
  3. 13
  4. Arch

From libqb 2.0.10-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.