From: "Network Nut" <sillystack@gmail.com>
To: "'Clemens Ladisch'" <clemens@ladisch.de>
Cc: <linux-kernel@vger.kernel.org>
Subject: RE: WaitForMultipleObjects/etc. In Kernel
Date: Tue, 28 Jan 2014 15:07:41 -0600 [thread overview]
Message-ID: <009701cf1c6c$fbfaff50$f3f0fdf0$@gmail.com> (raw)
In-Reply-To: <52E77282.4030303@ladisch.de>
> -----Original Message-----
> From: Clemens Ladisch [mailto:clemens@ladisch.de]
> Sent: Tuesday, January 28, 2014 3:04 AM
> To: Network Nut
> Cc: linux-kernel@vger.kernel.org
> Subject: Re: WaitForMultipleObjects/etc. In Kernel
>
> Network Nut wrote:
> > 5. I can simulate system-global named mutex using shared-memory for
> > underlying state of mutex (POCO NamedMutex) 6. I can get named
> > semaphore using POSIX sem_create
> >
> > It seems that the remaining problem is to get named mutex and named
> > semaphore to be accessible by file-descriptor.
>
> Forget about the POSIX stuff. You can implement a mutex by using an
> eventfd that has the value 1 in the unlocked state; a read locks, a write
of 1
> unlocks. You can implement a semaphore by using an eventfd with
> EFD_SEMAPHORE.
I was looking at POSIX because it allows naming of the primitives.
I need to reference inter-process {mutex, event, semaphore}, each identified
by string, if feasible.
I need to epoll_wait on inter-process {mutex, event, semaphore}.
> And I should note that it is a common pattern to start a bunch of other
> processes from a helper process; this not only allows inheriting file
> descriptors, but also makes monitoring these processes easier from the
> parent. Do all of your processes really need to be started independently?
Yes, all my processes need to be started independently.
Regards,
-Net
next prev parent reply other threads:[~2014-01-28 21:07 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 [this message]
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
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='009701cf1c6c$fbfaff50$f3f0fdf0$@gmail.com' \
--to=sillystack@gmail.com \
--cc=clemens@ladisch.de \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox