All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard.weinberger@gmail.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: "Petr Červenka" <grugh@centrum.cz>, Xenomai <xenomai@xenomai.org>
Subject: Re: rt_task_unblock() POSIX alternative
Date: Tue, 14 Apr 2020 12:23:42 +0200	[thread overview]
Message-ID: <CAFLxGvzkubcKhrzWvHQqQ6Stv4xD=LU2k6Uvhymk=YKHpKt91w@mail.gmail.com> (raw)
In-Reply-To: <6b8c89d1-bae0-90f5-4935-925fb0af2137@siemens.com>

On Tue, Apr 14, 2020 at 12:07 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>
> On 14.04.20 11:46, Richard Weinberger wrote:
> > On Tue, Apr 14, 2020 at 11:11 AM Petr Červenka <grugh@centrum.cz> wrote:
> >>
> >>> I fear there seems to be a confusion between POSIX tasks and POSIX skin.
> >>> Is your goal programming Xenomai realtime threads using POSIX alike APIs?
> >>> Or are you looking for a pedant of rt_task_unblock() to unblock a
> >>> POSIX task, without Xenomai realtime threads?
> >>>
> >>> The solution I provided is for the latter case.
> >>
> >>
> >>
> >> My original goal was to port a very complex realtime application from Xenomai 2.6.5 Native skin to Xenomai 3.1 POSIX skin. So I made series of examples, where I tried to verify porting of several designs used in the orig. application. And rt_task_unblock() for reconfiguration of the waiting threads in the orig app was one of them.
> >>
> >> Now I'm very curious, why the (my explicit) signals in Xenomai POSIX skin are not working for me as I would expect.
> >>
> >>
> >>
> >> Here is my compile command:
> >>
> >> g++ -fasynchronous-unwind-tables   -c -g -D_DEBUG -D_GNU_SOURCE -D_REENTRANT -D__COBALT_WRAP__ -D__COBALT__ -I/usr/xenomai/include/cobalt -I/usr/xenomai/include -MMD -MP -MF "build/Debug/GNU-Linux/main.o.d" -o build/Debug/GNU-Linux/main.o main.cpp
> >>
> >>
> >>
> >> Here is my link command:
> >>
> >> g++ -fasynchronous-unwind-tables    -o dist/Debug/GNU-Linux/countertestapp_4 build/Debug/GNU-Linux/main.o -L/usr/xenomai/lib -Wl,-rpath,'/usr/xenomai/lib' -Wl,--no-as-needed -Wl,@/usr/xenomai/lib/cobalt.wrappers -Wl,@/usr/xenomai/lib/modechk.wrappers /usr/xenomai/lib/xenomai/bootstrap.o -Wl,--wrap=main -Wl,--dynamic-list=/usr/xenomai/lib/dynlist.ld -lcobalt -lmodechk -lpthread -lrt
> >>
> >>
> >>
> >> I'm using Netbeans IDE for my attemps, but the I tried to integrate xeno-config --posix --cflags or --ldflags result into the project settings as much as possible.
> >
> > Okay. Now things get clearer.
> > pthread_kill() will be wrapped to Xenomai, but you installed a signal
> > handler for a Linux process.
> >
> > What you basically need is a function in the Xenomai POSIX skin which
> > calls threadobj_unblock().
> >
>
> Below the working version for unblocking the RT task with non-RT signal.

This interrupts the Linux syscall, yes. Does this also work when the
thread blocks on the Xenomai/Cobalt side?

-- 
Thanks,
//richard


  reply	other threads:[~2020-04-14 10:23 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-07 13:41 rt_task_unblock() POSIX alternative Petr Červenka
2020-04-07 14:59 ` Jan Kiszka
2020-04-07 15:18   ` Petr Červenka
2020-04-07 15:29     ` Jan Kiszka
2020-04-07 15:30     ` Richard Weinberger
2020-04-08  9:44       ` Petr Červenka
2020-04-08 10:06         ` Richard Weinberger
2020-04-08 21:36         ` Richard Weinberger
2020-04-09 15:00           ` Petr Červenka
2020-04-09 16:13             ` Richard Weinberger
2020-04-09 18:10               ` Petr Červenka
2020-04-09 18:48                 ` Richard Weinberger
2020-04-14  8:16                   ` Petr Červenka
2020-04-14  8:30                     ` Richard Weinberger
2020-04-14  9:10                       ` Petr Červenka
2020-04-14  9:46                         ` Richard Weinberger
2020-04-14 10:07                           ` Jan Kiszka
2020-04-14 10:23                             ` Richard Weinberger [this message]
2020-04-14 10:28                               ` Jan Kiszka
2020-04-14 10:41                                 ` Richard Weinberger
2020-04-14 10:43                                   ` Jan Kiszka
2020-04-14 10:56                                     ` Richard Weinberger
2020-04-14 11:01                                       ` Jan Kiszka
2020-04-14 11:05                                         ` Richard Weinberger
2020-04-14 11:30                                           ` Jan Kiszka
2020-04-14 10:39                             ` Petr Červenka

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='CAFLxGvzkubcKhrzWvHQqQ6Stv4xD=LU2k6Uvhymk=YKHpKt91w@mail.gmail.com' \
    --to=richard.weinberger@gmail.com \
    --cc=grugh@centrum.cz \
    --cc=jan.kiszka@siemens.com \
    --cc=xenomai@xenomai.org \
    /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.