From: Peter Rajnoha <prajnoha@redhat.com>
To: device-mapper development <dm-devel@redhat.com>
Subject: Re: [PATCH] Uevent cookie env var support
Date: Wed, 08 Apr 2009 14:58:46 +0200 [thread overview]
Message-ID: <49DC9F86.3020903@redhat.com> (raw)
In-Reply-To: <ac3eb2510904080549l50353d85xf1c4af8a31eb7613@mail.gmail.com>
Kay Sievers wrote:
> If you would use the same cookie for several actions, how do you
> track, that udev has finished the work when you expect an arbitrary
> number of events with the same cookie?
Well, I use a simple semaphore in userspace waiting for zero. So for
every action I just increment the semaphore and when the cookie comes back
from uevent, I decrement it (I use this cookie value as the semaphore's
identifier as well). So the number of uevents I'm expecting is not
arbitrary from this perspective. I just need to fire off all the actions
and then at some point later need to be sure that all the udev rules
were executed (so I'm sure all the nodes are created) and so I can continue.
Peter
next prev parent reply other threads:[~2009-04-08 12:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-08 12:04 [PATCH] Uevent cookie env var support Peter Rajnoha
2009-04-08 12:49 ` Kay Sievers
2009-04-08 12:58 ` Peter Rajnoha [this message]
2009-04-08 13:29 ` Kay Sievers
2009-04-08 13:20 ` Alasdair G Kergon
2009-04-08 13:31 ` Kay Sievers
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=49DC9F86.3020903@redhat.com \
--to=prajnoha@redhat.com \
--cc=dm-devel@redhat.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 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.