comedi_buf_read_samples(9)
π comedi_buf_read_samples(9) β Kernel API Manual
okay so bestie, welcome to comedi_buf_read_samples(9), straight out of the Kernel API Manual β¨ this is the little kernel-side icon that scoops sample data out of a COMEDI buffer, and honestly? she ate.
π NAME
comedi_buf_read_samples β Read sample data from COMEDI buffer πΈ
β¨ SYNOPSIS
unsigned int comedi_buf_read_samples (struct comedi_subdevice *s , void
*data , unsigned int nsamples );
π¦ ARGUMENTS
sβ the COMEDI subdevice, your main character for this whole operation πdataβ pointer to destination, i.e. where the samples are gonna land π―nsamplesβ maximum number of samples to read, the ceiling, the limit, the "don't get carried away" π
π DESCRIPTION
So here's the vibe: you read up to nsamples samples out of the COMEDI acquisition data buffer that's chillin' with the subdevice π«Ά, mark that data as read β
, and update the acquisition scan progress so everyone stays in the loop π.
The number of samples actually read gets limited to however many are available β no reaching for samples that aren't there, that would be embarrassing π. And if any samples get read at all, she sets the COMEDI_CB_BLOCK event flag, which is what causes waiting tasks to be woken when the event flags get processed β. literally the whole point.
π₯ RETURN
The amount of data read in bytes π (bytes, bestie, not samples β read the unit, iykyk).
π SEE ALSO
Kernel file ./drivers/comedi/comedi_buf.c, plus the whole friend group:
comedi_buf_write_alloc(9)comedi_buf_write_free(9)comedi_buf_read_n_available(9)comedi_buf_read_alloc(9)comedi_buf_read_free(9)comedi_buf_write_samples(9)
ngl she's the read half of the read/write duo, and she's highkey carrying the buffer game π
mwah π that's the page! shoutout to ./drivers/comedi for being the home base, and mark your calendars for October 2026 β that's the date on this little icon, and no cap, she'll still be slaying then π§ββοΈπ
π¦ 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