Re: [PATCH v3] ipc: Update semtimedop() to use hrtimer

From: Thomas Gleixner
Date: Thu Apr 28 2022 - 18:02:33 EST


On Thu, Apr 28 2022 at 13:50, Davidlohr Bueso wrote:
> On Thu, 28 Apr 2022, Prakash Sangappa wrote:
>>- if (timeout)
>>- jiffies_left = schedule_timeout(jiffies_left);
>>- else
>>- schedule();
>>+ timed_out = !schedule_hrtimeout_range(exp,
>>+ current->timer_slack_ns, HRTIMER_MODE_ABS);
>
> I'm wondering if the slack parameter instead of passing the timer_slack_ns
> value immediately, we should do a rt_task() check and pass zero if so.

We should have a wrapper function which takes care of that instead of
having checks all over the place.

Thanks,

tglx