Messages in this thread | | | From | Thomas Gleixner <> | Subject | Re: [patch V2 07/50] posix-cpu-timers: Split up posix_cpu_timer_get() | Date | Fri, 12 Apr 2024 21:48:23 +0200 |
| |
On Fri, Apr 12 2024 at 13:25, Eric W. Biederman wrote: > Thomas Gleixner <tglx@linutronix.de> writes: >> In preparation for addressing issues in the timer_get() and timer_set() >> functions of posix CPU timers. > > To see that this was safe I had to lookup and see that > cpu_timer_getexpires is a truly trivial function. > > static inline u64 cpu_timer_getexpires(struct cpu_timer *ctmr) > { > return ctmr->node.expires; > } > > I am a bit confused by the purpose of this function in > posix-cpu-timers.c.
I added that back then when I converted the code over to use a timerqueue instead of a linked list mostly because I did not want to fiddle in the inwars of timerqueue.
> In some places this helper is used (like below), and in other places > like bump_cpu_timer the expires member is accessed directly. > > It isn't really a problem, but it is something that might be > worth making consistent in the code to make it easier to read.
Yes, that's definitely inconsistent. I'll have a look.
Thanks,
tglx
| |