On 28 April 2015 at 18:52, Arnd Bergmann <[email protected]> wrote: > On Tuesday 28 April 2015 18:39:07 Baolin Wang wrote: > > On 28 April 2015 at 17:42, Arnd Bergmann <[email protected]> wrote: > > > > - if (!new_clock->clock_get) { > > > > - printk(KERN_WARNING "POSIX clock id %d lacks > > > clock_get()\n", > > > > + if (!new_clock->clock_get && !new_clock->clock_get64) { > > > > + printk(KERN_WARNING "POSIX clock id %d lacks > clock_get() > > > and clock_get64()\n", > > > > clock_id); > > > > return; > > > > } > > > > > > Here you are missing a step that Thomas suggested in the previous > review: > > > > > > add a default clock_get64() implementation that calls clock_get() > > > > > > > > But the default_timer_get64((struct k_clock *kc, struct k_itimer *timr, > struct > > itimerspec64 *cur_setting64) > > function he suggested can't get the "kc" parameter, cause the "timer_get" > > point prototype is > > "void (*timer_get64) (struct k_itimer *timr, struct itimerspec64 > > *cur_setting);". > > > > static int default_timer_get64(struct k_clock *kc, struct k_itimer *timr, > > struct itimerspec64 *cur_setting64) > > { > > struct itimerspec cur_setting; > > > > kc->timer_get(timer, &cur_setting); > > return 0; > > } > > > > This is something you should have asked in reply to Thomas' suggestion > when you noticed this was a problem. > > I think the answer is that you must use clockid_to_kclock(timr->it_clock) > to convert from a k_itimer structure to a k_clock structure. > > This is slightly inefficient, but it is only done in an intermediate > step and gets removed in the final patch/ > > Arnd > > Yes, I just saw the problem when i do here. And I'll add the conversion for the default function. Thanks for your suggestion.
-- Baolin.wang Best Regards _______________________________________________ Y2038 mailing list [email protected] https://lists.linaro.org/mailman/listinfo/y2038
