lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 12 May 2021 13:59:49 +0200
From:   Willy Tarreau <w@....eu>
To:     Mark Brown <broonie@...nel.org>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] tools/nolibc: Implement msleep()

On Wed, May 12, 2021 at 12:47:28PM +0100, Mark Brown wrote:
> Allow users to implement shorter delays than a full second by implementing
> msleep().
> 
> Signed-off-by: Mark Brown <broonie@...nel.org>
> ---
> 
> v2:
>  - Support delays of more than a second.
>  - Return the number of seconds remaining if the delay does not
>    complete.

But why returning the number of seconds instead of milliseconds ?
The common use case is this:

     delay = delay_before_next_event();
     while ((ret = msleep(delay)) > 0)
            delay -= ret;

Willy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ