STRUCT HSC_CLIENT_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

struct hsc_client_data β€” the internal client data for hsi_char, bestie. it's the little struct that holds all the receipts for one HSI client 🫢


✨ SYNOPSIS ✨

ok so picture this, the whole thing looks like:

struct hsc_client_data {
    struct cdev             cdev;
    struct mutex            lock;
    unsigned long           flags;
    unsigned int            usecnt;
    struct hsi_client       *cl;
    struct hsc_channel      channels[HSC_DEVS];
 };

that's it, that's the struct πŸ’…


πŸŽ€ MEMBERS πŸŽ€

like, one field at a time, no cap:

  • cdev β€” the character device that's associated with the hsi_client. it's giving "this is the device node the whole thing hangs off of" energy πŸ‘‘
  • lock β€” a lock whose whole job is to serialize open/close access. literally its only purpose, and it does it slayfully πŸ”’
  • flags β€” keeps track of the port state, fr fr β€” the parenthetical is that it's about the rx hwbreak being armed. so if you're wondering "is the rx hwbreak armed", this is where that lives 🚩
  • usecnt β€” the use count for claiming the HSI port, and bestie listen, it's mutex protected. do not touch it without the mutex, i'm serious 😭
  • cl β€” a reference to the HSI client. that's the client. that's the pointer. iconic 🌸
  • channels β€” an array of the channels that are accessible by the client, sized [HSC_DEVS]. yes, the whole array, all up in here πŸ¦‹
nothing here is optional, it's all just the struct's members, so like… vibe check passed, but also there's no "flag to turn off" situation, it's a struct, bestie πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

  • the kernel file ./drivers/hsi/clients/hsi_char.c
  • struct hsc_channel(9)

and that's the page!! πŸ’œ this lil rewrite came to you from source ./drivers/hsi/clients, dated October 2026, and yes it's still in the Kernel API Manual section 9 β€” go off, kernel docs πŸ‘‘βœ¨

πŸ“¦ where this page comes from