aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/export-to-postgresql-report
diff options
context:
space:
mode:
authorNuno Sá <[email protected]>2023-02-16 11:14:51 +0100
committerJonathan Cameron <[email protected]>2023-02-18 14:07:58 +0000
commit3da1814184582ed0faf039275a3f02e6f69944ee (patch)
tree11b508faf54a6b4451a383c1aaee042f2ae9913d /tools/perf/scripts/python/bin/export-to-postgresql-report
parentb5184a26a28fac1d708b0bfeeb958a9260c2924c (diff)
iio: buffer: make sure O_NONBLOCK is respected
For output buffers, there's no guarantee that the buffer won't be full in the first iteration of the loop in which case we would block independently of userspace passing O_NONBLOCK or not. Fix it by always checking the flag before going to sleep. While at it (and as it's a bit related), refactored the loop so that the stop condition is 'written != n', i.e, run the loop until all data has been copied into the IIO buffers. This makes the code a bit simpler. Fixes: 9eeee3b0bf190 ("iio: Add output buffer support") Signed-off-by: Nuno Sá <[email protected]> Reviewed-by: Lars-Peter Clausen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/export-to-postgresql-report')
0 files changed, 0 insertions, 0 deletions