[libcxx-commits] [PATCH] D99373: [SystemZ][z/OS] correct rc and errno within nanosleep()
Zibi Sarbino via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Apr 1 10:43:02 PDT 2021
zibi marked an inline comment as done.
zibi added inline comments.
================
Comment at: libcxx/include/__support/ibm/nanosleep.h:45
+ __rem->tv_sec = 0;
+ // nanoseconds can be a large number, 999999999 at the max
+ __rem->tv_nsec = __micro_sec * 1000;
----------------
Mordante wrote:
> I think I wasn't clear enough regarding what I meant with too large.
> When `nanosleep` fails with `EINTR` it should set the remaining time in `__rem`.
> When it fails during `sleep` it sets the proper value (except rounding up).
> When it fails during `usleep` with `EINTR` it acts as if it slept for 0 µs, which might be wrong. AFAIK it's not possible to fix this unless `usleep` on z/OS provides more information.
>
> So I like the mentioning of the rounding up, but I would also like some information regarding ignoring the time slept.
Thanks, have a look at new comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99373/new/
https://reviews.llvm.org/D99373
More information about the libcxx-commits
mailing list