[v6,2/3] time: Define time64 thrd_sleep

Message ID 20191108170302.29838-2-alistair.francis@wdc.com
State New, archived
Headers

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 Netto Nov. 8, 2019, 6:58 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 d7800eb30f8..cbacf4fc9d7 100644
> --- a/include/time.h
> +++ b/include/time.h
> @@ -210,8 +210,12 @@ libc_hidden_proto (__difftime64)
>  extern double __difftime (time_t time1, time_t time0);
>  
>  #if __TIMESIZE == 64
> +# define __thrd_sleep_time64 thrd_sleep
>  # define __clock_nanosleep_time64 __clock_nanosleep
>  #else
> +extern int __thrd_sleep_time64 (const struct __timespec64* time_point,
> +                                struct __timespec64* remaining);
> +libc_hidden_proto (__thrd_sleep_time64)
>  extern int __clock_nanosleep_time64 (clockid_t clock_id,
>                                       int flags, const struct __timespec64 *req,
>                                       struct __timespec64 *rem);
> 

I am missing the point of this patch, why are you adding the prototype
without the thrd_sleep time64 implementation?
  
Alistair Francis Nov. 8, 2019, 9:17 p.m. UTC | #2
On Fri, Nov 8, 2019 at 10:58 AM Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
>
>
>
> 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 d7800eb30f8..cbacf4fc9d7 100644
> > --- a/include/time.h
> > +++ b/include/time.h
> > @@ -210,8 +210,12 @@ libc_hidden_proto (__difftime64)
> >  extern double __difftime (time_t time1, time_t time0);
> >
> >  #if __TIMESIZE == 64
> > +# define __thrd_sleep_time64 thrd_sleep
> >  # define __clock_nanosleep_time64 __clock_nanosleep
> >  #else
> > +extern int __thrd_sleep_time64 (const struct __timespec64* time_point,
> > +                                struct __timespec64* remaining);
> > +libc_hidden_proto (__thrd_sleep_time64)
> >  extern int __clock_nanosleep_time64 (clockid_t clock_id,
> >                                       int flags, const struct __timespec64 *req,
> >                                       struct __timespec64 *rem);
> >
>
> I am missing the point of this patch, why are you adding the prototype
> without the thrd_sleep time64 implementation?

I actually don't think these twp patches are required. They were just
left over that I kept porting that are no longer needed. I'll drop
these two.

Alistair
  

Patch

diff --git a/include/time.h b/include/time.h
index d7800eb30f8..cbacf4fc9d7 100644
--- a/include/time.h
+++ b/include/time.h
@@ -210,8 +210,12 @@  libc_hidden_proto (__difftime64)
 extern double __difftime (time_t time1, time_t time0);
 
 #if __TIMESIZE == 64
+# define __thrd_sleep_time64 thrd_sleep
 # define __clock_nanosleep_time64 __clock_nanosleep
 #else
+extern int __thrd_sleep_time64 (const struct __timespec64* time_point,
+                                struct __timespec64* remaining);
+libc_hidden_proto (__thrd_sleep_time64)
 extern int __clock_nanosleep_time64 (clockid_t clock_id,
                                      int flags, const struct __timespec64 *req,
                                      struct __timespec64 *rem);