nvec_write_sync(9)
π 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β anstruct nvec_chipπ that's your chip, your main characterdataβ the data to write π the actual payload, the momentsizeβ the size ofdataπΈ how many bytes we're servingmsgβ 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 β
0on 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:
enum nvec_msg_category(9)nvec_register_notifier(9)nvec_unregister_notifier(9)nvec_msg_alloc(9)nvec_msg_free(9)nvec_msg_is_event(9)nvec_msg_size(9)nvec_gpio_set_value(9)nvec_write_async(9)nvec_toggle_global_events(9)nvec_event_mask(9)nvec_request_master(9)parse_msg(9)nvec_dispatch(9)nvec_tx_completed(9)nvec_rx_completed(9)nvec_invalid_flags(9)nvec_tx_set(9)tegra_i2c_writel(9)nvec_interrupt(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms