QB_LIST_SPLICE(3)

πŸ’– NAME πŸ’–

qb_list_splice β€” join two lists, bestie. That's it. That's the whole job. Two lists walk in, one list walks out. πŸ¦‹


✨ SYNOPSIS ✨

okay so first you gotta pull in the header:

#include <qb/qblist.h>

and then, here's the queen herself:

static void qb_list_splice(
    struct qb_list_head   *list,  /* the new list to add. */
    struct qb_list_head   *head   /* the place to add it in the first list.*/
);

like… look at her. static, void, two pointers, zero drama. no cap. πŸ’…


πŸŽ€ PARAMS πŸŽ€

  • list β€” the new list to add. this is the incoming baddie, the one getting spliced in. ✨
  • head β€” the place to add it in the first list. so like, the spot in the OG list where list is gonna land. πŸ“

🌸 DESCRIPTION 🌸

so… the original page literally has nothing written here. the section exists, the vibes exist, but the words do not. it's giving "silent but iconic." 🫢

ngl there's nothing extra to tell you that isn't already covered above and below β€” the params tell you what goes in, the structures tell you what these things are made of, and the note tells you the one thing you absolutely need to remember. that's the whole meal, bestie. πŸ“


🌈 STRUCTURES 🌈

here's what a qb_list_head looks like from the inside:

struct qb_list_head {
    struct   next;
    struct   prev;
};

yes, that's exactly how it's written on the page. next and prev, no type names attached in the listing. not me double-checking it β€” it's just what's there. πŸ™ˆ copy it exactly, don't get cute with it.


⭐ NOTE ⭐

the "list" is reinitialised. πŸ‘‘

that's the one, fr fr. the list you hand in as list gets reinitialised. keep that in your brain forever. πŸ’œ


πŸ‘‘ SEE ALSO πŸ‘‘

the whole girl squad, go read them too:


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


that's the page, bestie! this one came out of the libqb Programmer's Manual, stamped LIBQB, dated 2025-09-16, and filed under QB_LIST_SPLICE(3). slay, go splice something. πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from