All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 04/15] posix timers:Introduce the 64bit methods with timespec64 type for k_clock structure
@ 2015-04-30  8:12 Baolin Wang
  2015-05-05 13:31 ` Thomas Gleixner
  0 siblings, 1 reply; 3+ messages in thread
From: Baolin Wang @ 2015-04-30  8:12 UTC (permalink / raw)
  To: tglx; +Cc: arnd, linux-kernel, baolin.wang, y2038

This patch introduces the new methods with timespec64/itimerspec64 type for k_clcok
structure,converts the timepsec type to timespec64 type in k_clock structure and
converts the itimerspec type to itimerspec64 type to ready for 2038 issue.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
---
 include/linux/posix-timers.h |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h
index 907f3fd..35786c5 100644
--- a/include/linux/posix-timers.h
+++ b/include/linux/posix-timers.h
@@ -98,9 +98,13 @@ struct k_itimer {
 
 struct k_clock {
 	int (*clock_getres) (const clockid_t which_clock, struct timespec *tp);
+	int (*clock_getres64) (const clockid_t which_clock, struct timespec64 *tp);
 	int (*clock_set) (const clockid_t which_clock,
 			  const struct timespec *tp);
+	int (*clock_set64) (const clockid_t which_clock,
+			    const struct timespec64 *tp);
 	int (*clock_get) (const clockid_t which_clock, struct timespec * tp);
+	int (*clock_get64) (const clockid_t which_clock, struct timespec64 *tp);
 	int (*clock_adj) (const clockid_t which_clock, struct timex *tx);
 	int (*timer_create) (struct k_itimer *timer);
 	int (*nsleep) (const clockid_t which_clock, int flags,
@@ -109,10 +113,15 @@ struct k_clock {
 	int (*timer_set) (struct k_itimer * timr, int flags,
 			  struct itimerspec * new_setting,
 			  struct itimerspec * old_setting);
+	int (*timer_set64) (struct k_itimer *timr, int flags,
+			    struct itimerspec64 *new_setting,
+			    struct itimerspec64 *old_setting);
 	int (*timer_del) (struct k_itimer * timr);
 #define TIMER_RETRY 1
 	void (*timer_get) (struct k_itimer * timr,
 			   struct itimerspec * cur_setting);
+	void (*timer_get64) (struct k_itimer *timr,
+			     struct itimerspec64 *cur_setting);
 };
 
 extern struct k_clock clock_posix_cpu;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 04/15] posix timers:Introduce the 64bit methods with timespec64 type for k_clock structure
  2015-04-30  8:12 [PATCH v2 04/15] posix timers:Introduce the 64bit methods with timespec64 type for k_clock structure Baolin Wang
@ 2015-05-05 13:31 ` Thomas Gleixner
       [not found]   ` <CAMz4kuJSPkY1pV4pOzjYAT1eb5M_G+eJ2dX58J1ADhXrhbJUtg@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Gleixner @ 2015-05-05 13:31 UTC (permalink / raw)
  To: Baolin Wang; +Cc: arnd, linux-kernel, y2038

On Thu, 30 Apr 2015, Baolin Wang wrote:
> diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h
> index 907f3fd..35786c5 100644
> --- a/include/linux/posix-timers.h
> +++ b/include/linux/posix-timers.h
> @@ -98,9 +98,13 @@ struct k_itimer {
>  
>  struct k_clock {
>  	int (*clock_getres) (const clockid_t which_clock, struct timespec *tp);
> +	int (*clock_getres64) (const clockid_t which_clock, struct timespec64 *tp);
>  	int (*clock_set) (const clockid_t which_clock,
>  			  const struct timespec *tp);
> +	int (*clock_set64) (const clockid_t which_clock,
> +			    const struct timespec64 *tp);
>  	int (*clock_get) (const clockid_t which_clock, struct timespec * tp);
> +	int (*clock_get64) (const clockid_t which_clock, struct timespec64 *tp);
>  	int (*clock_adj) (const clockid_t which_clock, struct timex *tx);
>  	int (*timer_create) (struct k_itimer *timer);
>  	int (*nsleep) (const clockid_t which_clock, int flags,
> @@ -109,10 +113,15 @@ struct k_clock {
>  	int (*timer_set) (struct k_itimer * timr, int flags,
>  			  struct itimerspec * new_setting,
>  			  struct itimerspec * old_setting);
> +	int (*timer_set64) (struct k_itimer *timr, int flags,
> +			    struct itimerspec64 *new_setting,
> +			    struct itimerspec64 *old_setting);
>  	int (*timer_del) (struct k_itimer * timr);
>  #define TIMER_RETRY 1
>  	void (*timer_get) (struct k_itimer * timr,
>  			   struct itimerspec * cur_setting);
> +	void (*timer_get64) (struct k_itimer *timr,
> +			     struct itimerspec64 *cur_setting);

I asked you last time to provide a conversion for a single instance
first and I gave you even step by step instructions.

But you insist on resending the whole mess in one go. Try again.

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 04/15] posix timers:Introduce the 64bit methods with timespec64 type for k_clock structure
       [not found]   ` <CAMz4kuJSPkY1pV4pOzjYAT1eb5M_G+eJ2dX58J1ADhXrhbJUtg@mail.gmail.com>
@ 2015-05-06  8:06     ` Thomas Gleixner
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Gleixner @ 2015-05-06  8:06 UTC (permalink / raw)
  To: Baolin Wang; +Cc: Arnd Bergmann, linux-kernel, y2038 Mailman List

On Wed, 6 May 2015, Baolin Wang wrote:
> On 5 May 2015 at 21:31, Thomas Gleixner <tglx@linutronix.de> wrote:
> 
> > On Thu, 30 Apr 2015, Baolin Wang wrote:
> > > diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h
> > > index 907f3fd..35786c5 100644
> > > --- a/include/linux/posix-timers.h
> > > +++ b/include/linux/posix-timers.h
> > > @@ -98,9 +98,13 @@ struct k_itimer {
> > >
> > >  struct k_clock {
> > >       int (*clock_getres) (const clockid_t which_clock, struct timespec
> > *tp);
> > > +     int (*clock_getres64) (const clockid_t which_clock, struct
> > timespec64 *tp);
> > >       int (*clock_set) (const clockid_t which_clock,
> > >                         const struct timespec *tp);
> > > +     int (*clock_set64) (const clockid_t which_clock,
> > > +                         const struct timespec64 *tp);
> > >       int (*clock_get) (const clockid_t which_clock, struct timespec *
> > tp);
> > > +     int (*clock_get64) (const clockid_t which_clock, struct timespec64
> > *tp);
> > >       int (*clock_adj) (const clockid_t which_clock, struct timex *tx);
> > >       int (*timer_create) (struct k_itimer *timer);
> > >       int (*nsleep) (const clockid_t which_clock, int flags,
> > > @@ -109,10 +113,15 @@ struct k_clock {
> > >       int (*timer_set) (struct k_itimer * timr, int flags,
> > >                         struct itimerspec * new_setting,
> > >                         struct itimerspec * old_setting);
> > > +     int (*timer_set64) (struct k_itimer *timr, int flags,
> > > +                         struct itimerspec64 *new_setting,
> > > +                         struct itimerspec64 *old_setting);
> > >       int (*timer_del) (struct k_itimer * timr);
> > >  #define TIMER_RETRY 1
> > >       void (*timer_get) (struct k_itimer * timr,
> > >                          struct itimerspec * cur_setting);
> > > +     void (*timer_get64) (struct k_itimer *timr,
> > > +                          struct itimerspec64 *cur_setting);
> >
> > I asked you last time to provide a conversion for a single instance
> > first and I gave you even step by step instructions.
> >
> > But you insist on resending the whole mess in one go. Try again.
> >
> > Thanks,
> >
> >         tglx
> >
> 
> Hi Thomas,
> 
> Thanks for your comments. I think i have followed your instructions
> to convert the syscall functions in patch 5 and patch 6.
> 
> And i have confusions about the "a single instance first", could you
> explain that in detail? Thanks a lot.

Single function, single syscall. Not a wholesale conversion of the
world and some more.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-06  8:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-30  8:12 [PATCH v2 04/15] posix timers:Introduce the 64bit methods with timespec64 type for k_clock structure Baolin Wang
2015-05-05 13:31 ` Thomas Gleixner
     [not found]   ` <CAMz4kuJSPkY1pV4pOzjYAT1eb5M_G+eJ2dX58J1ADhXrhbJUtg@mail.gmail.com>
2015-05-06  8:06     ` Thomas Gleixner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.