All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Jeff Weber <jwamsc@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] pthread exit and PTHREAD_WARNSW
Date: Tue, 12 Apr 2011 16:38:10 +0200	[thread overview]
Message-ID: <4DA463D2.9030502@domain.hid> (raw)
In-Reply-To: <BANLkTikTWM75UZknkYRt=MeOUDJVsNmLAA@mail.gmail.com>

Jeff Weber wrote:

Hi Jeff,

any news about the hostrt patch I sent you for x86_32? Does it work?

> From testing, I found that if I enable PTHREAD_WARNSW for a pthread, I must
> explicitly disable this mode before the thread terminates, or the thread
> draws a signal 24 SIGXCPU.

Yes, the problem is that we can put such migration if the thread
function returns, but it will not work in case pthread_exit is called.

> 
> I've tried to simplify my thread terminations by pushing a function which
> calls pthread_set_mode_np(PTHREAD_WARNSW, 0) onto the thread cleanup stack,
> and always terminating the thread via pthread_exit().  However, this method
> still draws a signal 24 SIGXCPU.    Here's a sample backtrace:

... and pthread_exit is basically a Linux service, so, we can not
guarantee that it does not make any syscall before executing the cleanup
handlers.

-- 
					    Gilles.


  reply	other threads:[~2011-04-12 14:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-12 14:27 [Xenomai-help] pthread exit and PTHREAD_WARNSW Jeff Weber
2011-04-12 14:38 ` Gilles Chanteperdrix [this message]
2011-04-12 15:06   ` Jeff Weber
2011-04-12 15:20     ` Gilles Chanteperdrix
2011-04-12 18:39       ` Jeff Weber
2011-04-14 12:15         ` Gilles Chanteperdrix

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=4DA463D2.9030502@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=jwamsc@domain.hid \
    --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.