All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Fillod Stephane <stephane.fillod@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Problem with Message queue
Date: Mon, 14 May 2007 21:16:28 +0200	[thread overview]
Message-ID: <17992.46476.24771.264671@domain.hid> (raw)
In-Reply-To: <0B45E93C5FF65740AEAE690BF3848B7A4AB0C9@domain.hid>

Fillod Stephane wrote:
 > Perrine Martignoni wrote:
 > [..]
 > >int DESTRUCT=0;
 >  
 > I'm always nervous to see global variables shared among threads without
 > a volatile keyword. An explicit memory barrier would be better, as it
 > has been re-explained in a LWN article lately (wait Thursday for free access)
 > http://lwn.net/Articles/233479/

Besides, this termination mechanism results on a deadlock on SMP. Please
kill this DESTRUCT variable and replace cleanup_upon_sig with:

void cleanup_upon_sig(int sig __attribute__((unused)))

{
	pthread_cancel(task1);
	pthread_cancel(task2);
}


-- 


					    Gilles Chanteperdrix.


  parent reply	other threads:[~2007-05-14 19:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-14 12:11 [Xenomai-help] Problem with Message queue Fillod Stephane
2007-05-14 13:36 ` Gilles Chanteperdrix
2007-05-14 19:16 ` Gilles Chanteperdrix [this message]
2007-05-15  8:00   ` Perrine Martignoni
  -- strict thread matches above, loose matches on Subject: below --
2007-05-14  9:21 Perrine Martignoni
2007-05-14  9:51 ` Gilles Chanteperdrix
2007-05-14 11:04 ` Gilles Chanteperdrix
2007-05-14 11:57   ` 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=17992.46476.24771.264671@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=stephane.fillod@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.