comedi_inc_scan_progress(9)
π comedi_inc_scan_progress β like, the Linux Kernel API Manual page, bestie β¨
okay so this is the comedi_inc_scan_progress(9) page from the Kernel API Manual, and honestly? it's a little one-but-mighty situation π
β¨ NAME β¨
comedi_inc_scan_progress β update scan progress in an asynchronous command π¦
πΈ SYNOPSIS πΈ
void comedi_inc_scan_progress (struct comedi_subdevice *s , unsigned int
num_bytes );
like, that's the whole thing. no return value, no drama, just vibes and a void π
π«Ά ARGUMENTS π«Ά
sβ the COMEDI subdevice. that's your girl, the thing we're tracking progress on.num_bytesβ how much data, in bytes, we're bumping the scan progress by. the amount. the increment. the little push forward π
π DESCRIPTION π
so what this does is it increments the scan progress by the number of bytes you gave it in num_bytes. simple, clean, no notes.
and then here's the main character moment π: if the scan progress reaches or exceeds the scan length in bytes, it reduces the scan progress modulo the scan length in bytes, and sets the "end of scan" asynchronous event flag, aka COMEDI_CB_EOS, to be processed later. periodt. that's the whole function.
ngl, the "reaches or exceeds" part matters β it's not just a strict equals situation, and the whole thing wraps around with the modulo rather than resetting to zero-ish. keep that in mind iykyk π
π₯ SEE ALSO π₯
Kernel file ./drivers/comedi/drivers.c β and the whole friend group of related calls, fr fr:
comedi_set_hw_dev(9)comedi_alloc_devpriv(9)comedi_alloc_subdevices(9)comedi_alloc_subdev_readback(9)comedi_readback_insn_read(9)comedi_timeout(9)comedi_dio_insn_config(9)comedi_dio_update_state(9)comedi_bytes_per_scan_cmd(9)comedi_bytes_per_scan(9)comedi_nscans_left(9)comedi_nsamples_left(9)comedi_handle_events(9)comedi_load_firmware(9)__comedi_check_request_region(9)comedi_check_request_region(9)comedi_legacy_detach(9)comedi_auto_config(9)comedi_auto_unconfig(9)comedi_driver_register(9)comedi_driver_unregister(9)
and that's the page!! π§ this little icon lives at ./drivers/comedi, dated October 2026, bestie β go forth and increment responsibly πβ
π¦ 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