nvec_write_sync(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… nvec_write_sync(9) πŸ’…

okay so bestie, welcome to the nvec_write_sync page πŸ’– this is from the Kernel API Manual, and it's literally the "send it and wait for the answer" girlie of the nvec family. no cap, she's the patient one ✨


🌸 NAME 🌸

nvec_write_sync β€” write a message to nvec and read the response 🫢


✨ SYNOPSIS ✨

int nvec_write_sync (struct nvec_chip *nvec , const unsigned char *data
, short size , struct nvec_msg **msg );

like, that's the whole vibe check right there πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • nvec β€” an struct nvec_chip πŸ’œ that's your chip, your main character
  • data β€” the data to write πŸ“ the actual payload, the moment
  • size β€” the size of data 🌸 how many bytes we're serving
  • msg β€” the response message received πŸ¦‹ the tea comes back through here

🧚 DESCRIPTION 🧚

so this one is similar to nvec_write_async, except β€” and this is the whole point β€” it waits for the request to be answered before returning. like, she doesn't just fire and forget, she sends it and then sits there until the reply shows up. respect tbh πŸ’…

⚠️ important bestie: this function uses a mutex, which means it can not be called from e.g. interrupt handlers. do not do that. that's a no. πŸ™ˆ

⭐ RETURN ⭐

  • 0 on success πŸŽ‰
  • a negative error code on failure 😭

the response message comes back to you in msg 🎁 and β€” listen β€” it shall be freed with nvec_msg_free once it's no longer used. don't leave her hanging, free your messages, it's giving basic hygiene 🧼✨


🌈 SEE ALSO 🌈

literally the whole friend group, go say hi πŸ‘‹πŸ’–

kernel file ./drivers/staging/nvec/nvec.c, plus:


okay that's the page!! πŸŽ€ this lil baddie lives in ./drivers/staging/nvec, dated October 2026 β€” mwah, go forth and sync responsibly, iykyk πŸ’œπŸ”₯πŸ‘‘

πŸ“¦ where this page comes from