[v6,3/3] time: Define time64 nanosleep
diff mbox series

Message ID 20191108170302.29838-3-alistair.francis@wdc.com
State New
Headers show
Series
  • [v6,1/3] sysdeps/clock_nanosleep: Use clock_nanosleep_time64 if avaliable
Related show

Commit Message

Alistair Francis Nov. 8, 2019, 5:03 p.m. UTC
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
 include/time.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Adhemerval Zanella Nov. 8, 2019, 6:59 p.m. UTC | #1
On 08/11/2019 14:03, Alistair Francis wrote:
> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> ---
>  include/time.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/time.h b/include/time.h
> index cbacf4fc9d7..d53f769c942 100644
> --- a/include/time.h
> +++ b/include/time.h
> @@ -212,6 +212,7 @@ extern double __difftime (time_t time1, time_t time0);
>  #if __TIMESIZE == 64
>  # define __thrd_sleep_time64 thrd_sleep
>  # define __clock_nanosleep_time64 __clock_nanosleep
> +# define __nanosleep_time64 __nanosleep
>  #else
>  extern int __thrd_sleep_time64 (const struct __timespec64* time_point,
>                                  struct __timespec64* remaining);
> @@ -220,6 +221,9 @@ extern int __clock_nanosleep_time64 (clockid_t clock_id,
>                                       int flags, const struct __timespec64 *req,
>                                       struct __timespec64 *rem);
>  libc_hidden_proto (__clock_nanosleep_time64)
> +extern int __nanosleep_time64 (const struct __timespec64 *requested_time,
> +                                struct __timespec64 *remaining);
> +libc_hidden_proto (__nanosleep_time64)
>  #endif
>  
>  /* Use in the clock_* functions.  Size of the field representing the
> 

As for thr_sleep patch, why are you adding the prototype without the
implementation for nanosleep ?

Patch
diff mbox series

diff --git a/include/time.h b/include/time.h
index cbacf4fc9d7..d53f769c942 100644
--- a/include/time.h
+++ b/include/time.h
@@ -212,6 +212,7 @@  extern double __difftime (time_t time1, time_t time0);
 #if __TIMESIZE == 64
 # define __thrd_sleep_time64 thrd_sleep
 # define __clock_nanosleep_time64 __clock_nanosleep
+# define __nanosleep_time64 __nanosleep
 #else
 extern int __thrd_sleep_time64 (const struct __timespec64* time_point,
                                 struct __timespec64* remaining);
@@ -220,6 +221,9 @@  extern int __clock_nanosleep_time64 (clockid_t clock_id,
                                      int flags, const struct __timespec64 *req,
                                      struct __timespec64 *rem);
 libc_hidden_proto (__clock_nanosleep_time64)
+extern int __nanosleep_time64 (const struct __timespec64 *requested_time,
+                                struct __timespec64 *remaining);
+libc_hidden_proto (__nanosleep_time64)
 #endif
 
 /* Use in the clock_* functions.  Size of the field representing the