summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2024-07-23 02:02:51 -0700
committerVito Caputo <vcaputo@pengaru.com>2024-07-23 02:02:51 -0700
commit9f564cf8df6ef5fcba37082ba8013d6175955125 (patch)
treef2492e7b0d1ab82033c73d22700e04bf1b4b7c61 /src/util.h
parentd113bc4f3328bd2859bf13bf4a92ce2ad668fd85 (diff)
libvmon: assume short positive reads found EOF
This avoids a bunch of pread() returning 0 EOF-finding calls. These are proc files, and actually shouldn't be getting read in a loop like this at all because it's racy to do so. With proc files you need to atomically read everything you wish to parse as one sample as an atomic unit. So this needs to be properly reworked to enlarge the buffer when a read exhausts it, throwing away what was read, then repeating the sample with the enlarged buffer. But this is tenable for now until I get around to the proper rework... just looking to reduce some sampling overheads on lower end embedded devices.
Diffstat (limited to 'src/util.h')
0 files changed, 0 insertions, 0 deletions
© All Rights Reserved