LIU Hao wrote:

> Thanks. I have pushed these patches, with some typos in commit messages fixed:
>
>   - 'assert that is always succeeds' -> 'assert that it always succeeds'
>   - 'Raname' -> 'Rename'
>   - 'althout' -> 'although'
>   - 'my moving' -> 'by moving'
>   - 'unsinged' -> 'unsigned'
>   - 'instaed' -> 'instead'
>
> and this (generated by `git diff -b`):
>
> diff --git a/mingw-w64-libraries/winpthreads/src/time.c 
> b/mingw-w64-libraries/winpthreads/src/time.c
> index c02bfc4c6..6576dc6be 100644
> --- a/mingw-w64-libraries/winpthreads/src/time.c
> +++ b/mingw-w64-libraries/winpthreads/src/time.c
> @@ -375,7 +375,8 @@ int nanosleep64 (const struct _timespec64 *request, 
> struct _timespec64 *remain)
>     /**
>      * Currently, function `_pthread_delay_np_ms` always returns zero.
>      */
> -  if (unlikely (error_code != 0) && remain != NULL) {
> +  if (unlikely (error_code != 0)) {
> +    if (remain != NULL) {
>         WinpthreadsTimeApi.PtrGetSystemTimePreciseAsFileTime (&endTime);
>
>         ULARGE_INTEGER start = {
> @@ -403,6 +404,7 @@ int nanosleep64 (const struct _timespec64 *request, 
> struct _timespec64 *remain)
>
>         remain->tv_sec  = (__time64_t) (remainingSleepTime / POW10_3);
>         remain->tv_nsec = (long) ((remainingSleepTime % POW10_3) * POW10_6);
> +    }
>
>       _set_errno (EINTR);
>       return -1;

Thanks! I'll probably send follow up changes somewhere next week; those will 
include more improvements, including some that were already mentioned.

- Kirill Makurin

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to