lkml.org 
[lkml]   [2019]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch V2 26/38] posix-cpu-timers: Make expiry checks array based
On Wed, Aug 21, 2019 at 09:09:13PM +0200, Thomas Gleixner wrote:
> The expiry cache is an array indexed by clock ids. The new sample functions
> allow to retrieve a corresponding array of samples.
>
> Convert the fastpath expiry checks to make use of the new sample functions
> and do the comparisons on the sample and the expiry array.
>
> Make the check for the expiry array being zero array based as well.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

Reviewed-by: Frederic Weisbecker <frederic@kernel.org>

Just a few boring neats:

> /**
> - * task_cputime_expired - Compare two task_cputime entities.
> + * task_cputimers_expired - Compare two task_cputime entities.

s/task_cputime/clock arrays ?

> *
> - * @sample: The task_cputime structure to be checked for expiration.
> - * @expires: Expiration times, against which @sample will be checked.
> + * @samples: Array of current samples for the CPUCLOCK clocks
> + * @expiries: Array of expiry values for the CPUCLOCK clocks
> *
> - * Checks @sample against @expires to see if any field of @sample has expired.
> - * Returns true if any field of the former is greater than the corresponding
> - * field of the latter if the latter field is set. Otherwise returns false.
> + * Returns true if any mmember of @samples is greater than the corresponding

s/mmember/member

> + * member of @expiries if that member is non zero. False otherwise
> */
> -static inline int task_cputime_expired(const struct task_cputime *sample,
> - const struct task_cputime *expires)
> +static inline bool task_cputimers_expired(const u64 *sample, const u64 *expiries)

s/sample/samples to agree with above documented parameters.

Thanks.

\
 
 \ /
  Last update: 2019-08-24 00:45    [W:0.288 / U:6.920 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site