public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Network Nut" <sillystack@gmail.com>
To: "'Clemens Ladisch'" <clemens@ladisch.de>
Cc: "'Austin S. Hemmelgarn'" <ahferroin7@gmail.com>,
	<linux-kernel@vger.kernel.org>
Subject: RE: WaitForMultipleObjects/etc. In Kernel
Date: Fri, 31 Jan 2014 17:08:25 -0600	[thread overview]
Message-ID: <008101cf1ed9$588966d0$099c3470$@gmail.com> (raw)
In-Reply-To: <007f01cf1ed8$3b8e1450$b2aa3cf0$@gmail.com>


> -----Original Message-----
> From: Network Nut [mailto:sillystack@gmail.com]
> Sent: Friday, January 31, 2014 5:00 PM
> To: 'Clemens Ladisch'
> Cc: 'Austin S. Hemmelgarn'; linux-kernel@vger.kernel.org
> Subject: RE: WaitForMultipleObjects/etc. In Kernel
> > -----Original Message-----
> > From: Clemens Ladisch [mailto:clemens@ladisch.de]
> > Sent: Friday, January 31, 2014 4:54 PM
> > To: Network Nut
> > Cc: 'Austin S. Hemmelgarn'; linux-kernel@vger.kernel.org
> > Subject: Re: WaitForMultipleObjects/etc. In Kernel
> >
> > 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.)
> 
> How do I create the socket at "well-known path"?

Nevermind. I see it. 

It is the sockaddr_un.sun_path.

Thanks!

-Nut





      reply	other threads:[~2014-01-31 23:08 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
2014-01-31 23:00                       ` Network Nut
2014-01-31 23:08                         ` Network Nut [this message]

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='008101cf1ed9$588966d0$099c3470$@gmail.com' \
    --to=sillystack@gmail.com \
    --cc=ahferroin7@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