All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@sigma-star.at>
To: Philippe Gerum <rpm@xenomai.org>
Cc: Richard Weinberger <richard@nod.at>,
	xenomai@lists.linux.dev, upstream+xenomai@sigma-star.at
Subject: Re: [PATCH 2/5] Make RTDM tasks behave, part I
Date: Wed, 28 Jan 2026 14:31:09 +0100	[thread overview]
Message-ID: <6094973.eUyiRONoq7@nailgun> (raw)
In-Reply-To: <874io5vpkl.fsf@xenomai.org>

On Mittwoch, 28. Jänner 2026 14:23 Philippe Gerum wrote:
> > +	while (!rtdm_task_should_stop()) {
> >  		ret = rtdm_event_wait(&k_tuner->barrier);
> > -		if (ret)
> > +		if (ret == -EINTR)
> > +			continue;
> 
> Using -EINTR is going to be a problem if xnthread_unblock() is called to
> forcibly wake up a kernel task from a sleep. In this case, you would not
> be able to distinguish a signal receipt from a forcible
> unblock. -ERESTARTSYS may be better for that specific purpose in the
> RTDM API.

What is the expected behavior of a RTDM task when xnthread_unblock() is called?
Currently, it will just terminate, which seems also odd to me.

With my changes it will at least revisit rtdm_task_should_stop() and distinguishing
between unblocking and signals is possible.
rtdm_task_should_stop() uses signal_pending().

Thanks,
//richard

-- 
​​​​​sigma star gmbh | Eduard-Bodem-Gasse 6, 6020 Innsbruck, AUT UID/VAT Nr:
ATU 66964118 | FN: 374287y



  reply	other threads:[~2026-01-28 13:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-28 11:28 [PATCH 1/5] Allow changing CPU affinity of RTDM tasks Richard Weinberger
2026-01-28 11:28 ` [PATCH 2/5] Make RTDM tasks behave, part I Richard Weinberger
2026-01-28 13:23   ` Philippe Gerum
2026-01-28 13:31     ` Richard Weinberger [this message]
2026-01-28 13:54       ` Richard Weinberger
2026-01-28 16:37         ` Philippe Gerum
2026-01-28 11:28 ` [PATCH 3/5] Make RTDM tasks behave, part II Richard Weinberger
2026-01-29  9:45   ` Jan Kiszka
2026-01-28 11:28 ` [PATCH 4/5] Warn on unexpected RTDM task termination Richard Weinberger
2026-01-29  9:50   ` Jan Kiszka
2026-01-29  9:54     ` Florian Bezdeka
2026-01-28 11:28 ` [PATCH 5/5] Allow specifying CPU affinity in rtdm_task_init() Richard Weinberger
2026-01-29  9:53   ` Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6094973.eUyiRONoq7@nailgun \
    --to=richard@sigma-star.at \
    --cc=richard@nod.at \
    --cc=rpm@xenomai.org \
    --cc=upstream+xenomai@sigma-star.at \
    --cc=xenomai@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.