From: Wolfgang Grandegger <wg@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] How to cancel a Xenomai POSIX thread
Date: Thu, 06 Dec 2007 14:24:33 +0100 [thread overview]
Message-ID: <4757F811.70905@domain.hid> (raw)
In-Reply-To: <2ff1a98a0712060513g3b056866x883691498daf00e1@domain.hid>
Gilles Chanteperdrix wrote:
> On Dec 6, 2007 1:31 PM, Wolfgang Grandegger <wg@domain.hid> wrote:
>> Hello,
>>
>> how do I cancel or delete a Xenomai POSIX thread running in primary
>> context from a higher priority thread? IIUC, pthread_kill() can only be
>> used in secondary context. I tried pthread_cancel(), but it only works
>> when hitting a cancelation point, e.g. pthread_testcancel(). Setting
>> pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS) did not help. Is
>> there a code snippet or even an example program showing how to cancel a
>> pthread in primary context?
>
> pthread_kill or pthread_cancel should result in sending a signal to
> the target thread, so should cause this thread to switch to secondary
> mode to handle it. If you want to wait for the target thread to be
> canceled, you should use pthread_cancel and pthread_join.
There is no way to cancel a pthread in primary mode from another pthread?
Wolfgang.
next prev parent reply other threads:[~2007-12-06 13:24 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-06 12:31 [Xenomai-core] How to cancel a Xenomai POSIX thread Wolfgang Grandegger
2007-12-06 13:13 ` Gilles Chanteperdrix
2007-12-06 13:24 ` Wolfgang Grandegger [this message]
2007-12-06 13:28 ` Gilles Chanteperdrix
2007-12-06 13:44 ` Gilles Chanteperdrix
2007-12-06 14:05 ` Wolfgang Grandegger
2007-12-06 14:21 ` Gilles Chanteperdrix
2007-12-07 14:03 ` Wolfgang Grandegger
2007-12-07 21:23 ` Gilles Chanteperdrix
2007-12-07 22:10 ` Gilles Chanteperdrix
2007-12-09 21:55 ` Wolfgang Grandegger
2007-12-09 22:52 ` Gilles Chanteperdrix
2007-12-10 7:27 ` Wolfgang Grandegger
2007-12-10 15:20 ` Wolfgang Grandegger
2007-12-10 15:55 ` Gilles Chanteperdrix
2007-12-10 21:39 ` Wolfgang Grandegger
2007-12-10 21:46 ` Wolfgang Grandegger
2007-12-11 13:20 ` Wolfgang Grandegger
2007-12-11 13:23 ` Gilles Chanteperdrix
2007-12-11 14:39 ` Wolfgang Grandegger
2007-12-11 19:59 ` Gilles Chanteperdrix
2007-12-12 7:56 ` Wolfgang Grandegger
2007-12-12 9:07 ` Gilles Chanteperdrix
2007-12-12 9:59 ` Wolfgang Grandegger
2007-12-12 20:08 ` Gilles Chanteperdrix
2007-12-12 21:00 ` Wolfgang Grandegger
2007-12-12 21:48 ` Gilles Chanteperdrix
2007-12-10 21:56 ` Gilles Chanteperdrix
2007-12-10 21:21 ` Gilles Chanteperdrix
2007-12-10 21:37 ` Wolfgang Grandegger
2007-12-10 22:11 ` Gilles Chanteperdrix
2007-12-11 7:45 ` Wolfgang Grandegger
2007-12-06 13:47 ` Wolfgang Grandegger
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=4757F811.70905@domain.hid \
--to=wg@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.