public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* Re: [LTP] Add easy to use API for parent-child synchronization.
       [not found] ` <626133251.15365547.1355407159471.JavaMail.root@redhat.com>
@ 2012-12-13 14:19   ` chrubis
  0 siblings, 0 replies; only message in thread
From: chrubis @ 2012-12-13 14:19 UTC (permalink / raw)
  To: Jan Stancek; +Cc: ltp-list

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-12-13 14:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <153425741.15364762.1355407029689.JavaMail.root@redhat.com>
     [not found] ` <626133251.15365547.1355407159471.JavaMail.root@redhat.com>
2012-12-13 14:19   ` [LTP] Add easy to use API for parent-child synchronization chrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox