From mboxrd@z Thu Jan 1 00:00:00 1970 References: <20220402142127.944138-1-rpm@xenomai.org> From: Philippe Gerum Subject: Re: [PATCH 1/4] sched: dovetail: pass thread-info bits to arch_dovetail_switch_finish() Date: Sun, 03 Apr 2022 16:40:03 +0200 In-reply-to: Message-ID: <87mth2ns7l.fsf@xenomai.org> MIME-Version: 1.0 Content-Type: text/plain List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Weinberger Cc: Xenomai Richard Weinberger writes: > On Sat, Apr 2, 2022 at 4:23 PM Philippe Gerum via Xenomai > wrote: > >> - arch_dovetail_switch_finish(leave_inband); >> + ti_work = READ_ONCE(current_thread_info()->flags); >> + arch_dovetail_switch_finish(leave_inband, ti_work); > > Why are you passing ti_work as parameter? AFAIU you can > use current_thread_info()->flags directly in arch_dovetail_switch_finish(). Agreed, this affects the signature of arch_dovetail_switch_finish() for no good reason. Besides, this patch is missing a case (task resuming after oob -> inband transition). v2 follows (tested ok here). -- Philippe.