All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] max size for pipes and rt-fifos?
Date: Tue, 12 Sep 2006 00:29:10 +0200	[thread overview]
Message-ID: <4505E336.2060201@domain.hid> (raw)
In-Reply-To: <17669.52163.920452.626173@domain.hid>

[-- Attachment #1: Type: text/plain, Size: 1070 bytes --]

Gilles Chanteperdrix wrote:
> Jeff Webb wrote:
>  > Jan Kiszka wrote:
>  > >>   /* Shut down the real-time thread */
>  > >>   pthread_cancel (fifotest_task);
>  > >>   pthread_join (fifotest_task, NULL);  
>  > > 
>  > > pthread_join requires RT context and will not work as expected. But
>  > > that's unrelated to this problem.
>  > 
>  > Okay.  (I now see this restriction in the docs.)  What is the proper way to do this cleanup from kernel-space with Xenomai?  (Pardon my asking, as I haven't done much programming using POSIX threads.  I believe this syntax was suggested, or at least acceptable, with RTLinux.)
> 
> Calling pthread_cancel then pthread_join from a module cleanup routine
> should work. Because the cancelled thread preempts immediately the
> module cleanup routine, so when pthread_join is called, the thread no
> longer exists and there is no need to suspend the calling thread.
> 

Yes, but only on UP. What about including a simple polling loop into
kernel-space pthread_join, something like rtdm_task_join_nrt?

Jan



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

  reply	other threads:[~2006-09-11 22:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-06 21:14 [Xenomai-help] max size for pipes and rt-fifos? Jeff Webb
2006-09-07  9:23 ` Jan Kiszka
2006-09-07 19:53   ` Jeff Webb
2006-09-08  6:55     ` Jan Kiszka
2006-09-11 20:03       ` Jeff Webb
2006-09-11 20:49         ` Gilles Chanteperdrix
2006-09-11 22:29           ` Jan Kiszka [this message]
2006-09-12 11:29             ` Gilles Chanteperdrix
2006-09-08 13:59     ` Philippe Gerum
2006-09-09 16:05       ` Philippe Gerum
2006-09-11 20:29         ` Jeff Webb
2006-09-11 21:15           ` Philippe Gerum

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=4505E336.2060201@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=gilles.chanteperdrix@xenomai.org \
    --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.