All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: Steven Stewart-Gallus <sstewartgallus00@mylangara.bc.ca>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	dbueso@suse.de
Subject: Re: [PATCH] V1 1/2] ipc: let message queues use SIGEV_THREAD_ID with mq_notify
Date: Sun, 21 Sep 2014 15:38:10 +0200	[thread overview]
Message-ID: <541ED4C2.2050009@colorfullife.com> (raw)

Hi Steven,

You wrote:
> Currently the only thread-safe way of using mq_notify with message 
> queues is to use the SIGEV_THREAD option.
Could you explain what you mean with "only thread-safe way"?
I'm a bit relunctant to extend mq_notify() without understanding the reason.

What about:
- use sigprocmask()
- create one worker thread
- then in a loop in that worker thread: use sigwaitinfo() or signalfd() 
to collect the signals.


And one point I don't like: Within timer_create():
>  SIGEV_THREAD_ID (Linux-specific)
>  [...]
> The sigev_notify_thread_id field specifies a kernel thread ID, that 
> is, the value returned by clone(2) or gettid(2).
Does that mean that SIGEV_THREAD_ID is guaranteed to remain 
Linux-specific, it's implicitely linked to the Linux clone()/gettid() 
threading model?

> This flag is intended only for use by threading libraries.


--
     Manfred

             reply	other threads:[~2014-09-21 13:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-21 13:38 Manfred Spraul [this message]
2014-09-21 17:40 ` [PATCH] V1 1/2] ipc: let message queues use SIGEV_THREAD_ID with mq_notify Steven Stewart-Gallus
  -- strict thread matches above, loose matches on Subject: below --
2014-08-24  3:34 Steven Stewart-Gallus

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=541ED4C2.2050009@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=akpm@linux-foundation.org \
    --cc=dbueso@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sstewartgallus00@mylangara.bc.ca \
    /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.