From: chrubis@suse.cz
To: Jan Stancek <jstancek@redhat.com>
Cc: ltp-list <ltp-list@lists.sf.net>
Subject: Re: [LTP] Add easy to use API for parent-child synchronization.
Date: Thu, 13 Dec 2012 15:19:46 +0100 [thread overview]
Message-ID: <20121213141946.GA10891@rei> (raw)
In-Reply-To: <626133251.15365547.1355407159471.JavaMail.root@redhat.com>
Hi!
> am I reading it correctly, that you can only use it for single
> parent and child pair because the pipe name is pre-defined?
There is only one hardcoded pipe to keep the interface simple as I
haven't found testcase that would require more that this (that doesn't
mean there is none).
> Could be name of the pipe passed in tst_checkpoint_init()?
> The testcase I have in mind is 'waitid02' which spawns multiple children.
That shouldn't be a problem as far as you don't need to distinguish
between the childrens. Just call TST_CHECKPOINT_PARENT_WAIT() the number
of children you need to to wait for and it should work.
Each children would then write exactly one character to the fifo once
it's ready and the parent would wait until all childrens signaled that
they are ready.
Or even better we can easily create second version of parent wait that
would have number of children as an argument.
If you need something more complicated (i.e. synchronize several
childrens and parent) we can easily add filename parameter to the
checkpoint init and default to the current behavior if NULL is passed.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
parent reply other threads:[~2012-12-13 14:19 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <626133251.15365547.1355407159471.JavaMail.root@redhat.com>]
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=20121213141946.GA10891@rei \
--to=chrubis@suse.cz \
--cc=jstancek@redhat.com \
--cc=ltp-list@lists.sf.net \
/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