diff options
author | Keith Mok <keithmok@google.com> | 2021-11-17 01:09:44 +0000 |
---|---|---|
committer | John Stultz <jstultz@google.com> | 2022-06-22 02:16:35 +0000 |
commit | 554743de468d7213620828faf62e93aa95fa627c (patch) | |
tree | db91635d2b1967268749cb02c80acab2e862ef3d | |
parent | 5070d51aa0b52566cb9c224a931f10274d9be16a (diff) | |
download | drm_hwcomposer-554743de468d7213620828faf62e93aa95fa627c.tar.gz |
drm_hwcomposer: Fix EINTR handling in clock_nanosleep
clock_nanosleep return errno directly
instead of -1 with errno set
Signed-off-by: Keith Mok <keithmok@google.com>
[jstultz: Fixed minor style issues]
Signed-off-by: John Stultz <jstultz@google.com>
Change-Id: I779f2a8234b3dae46d64efee2210b7a2c5a92043
-rw-r--r-- | drm/VSyncWorker.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drm/VSyncWorker.cpp b/drm/VSyncWorker.cpp index 8cb4d08..ed41189 100644 --- a/drm/VSyncWorker.cpp +++ b/drm/VSyncWorker.cpp @@ -92,7 +92,7 @@ int VSyncWorker::SyntheticWaitVBlank(int64_t *timestamp) { vsync.tv_nsec = int(phased_timestamp - (vsync.tv_sec * kOneSecondNs)); do { ret = clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &vsync, nullptr); - } while (ret == -1 && errno == EINTR); + } while (ret == EINTR); if (ret) return ret; |