From: Clemens Ladisch <clemens@ladisch.de>
To: Network Nut <sillystack@gmail.com>
Cc: "'Austin S. Hemmelgarn'" <ahferroin7@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: WaitForMultipleObjects/etc. In Kernel
Date: Fri, 31 Jan 2014 23:53:47 +0100 [thread overview]
Message-ID: <52EC297B.7080909@ladisch.de> (raw)
In-Reply-To: <007d01cf1ed4$b0e659a0$12b30ce0$@gmail.com>
Network Nut wrote:
>> Assuming that you're porting to mainline distributions (and not embedded
>> devices), named SHM segments are accessible (providing the accessing
>> process has correct permissions) under /dev/shm. You just need to make
>> sure that you create the segment with the right permissions for the
>> other processes to access it.
>
> I already know how to do named shared memory between two processes. I only included that to describe my overall problem.
>
> The problem that I am having is how I can make three totally-independent processes interact:
>
> 1. M is a master process that creates a semaphore.
> 2. P1 is a process that operates against the semaphore.
> 3. P2 is a process that operates against the semaphore.
> 4. It is not permissible that M be responsible for launching P1 or P2.
> 5. The semaphore, one way or another, must allow itself to be specified as one of the synchronization primitives in epoll_wait()
This general problem descripton does not say anything more than your first
mail.
Use eventfd. To share it, use a Unix domain socket created by M. (This
socket must be created at a well-known path. shm_open() works similarly,
but that it creates a file in a RAM disk and mmap()s it is just an
implementation detail.)
Regards,
Clemens
next prev parent reply other threads:[~2014-01-31 22:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-25 22:01 WaitForMultipleObjects/etc. In Kernel Network Nut
2014-01-26 18:33 ` Clemens Ladisch
2014-01-26 22:10 ` Network Nut
2014-01-27 9:06 ` Clemens Ladisch
2014-01-27 19:50 ` Network Nut
2014-01-28 9:04 ` Clemens Ladisch
2014-01-28 21:07 ` Network Nut
2014-01-29 8:30 ` Clemens Ladisch
2014-01-30 23:49 ` Network Nut
2014-01-31 17:05 ` Austin S. Hemmelgarn
2014-01-31 22:35 ` Network Nut
2014-01-31 22:53 ` Clemens Ladisch [this message]
2014-01-31 23:00 ` Network Nut
2014-01-31 23:08 ` Network Nut
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=52EC297B.7080909@ladisch.de \
--to=clemens@ladisch.de \
--cc=ahferroin7@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sillystack@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox