[CRIU] [PATCH 23/24] zdtm: Add task_waiter_ helpers v2

Cyrill Gorcunov gorcunov at openvz.org
Thu Jun 7 09:29:19 EDT 2012


Sometime we need sync points in testee program
flow, for this reason task_waiter_ introduced.

The call semantics is the following

a) The fork() is used so both parent and child do not
   share memory referenced by task waiter. Thus the calling
   sequence should be

        Parent                  Child
        ------                  -----
        task_waiter_init
                                task_waiter_wait
        task_waiter_complete
        task_waiter_update
                                task_waiter_wait
        task_waiter_complete
        task_waiter_update

                ...

b) If shared memory is used then no need to call
   for task_waiter_update.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 test/zdtm/lib/Makefile  |    2 +-
 test/zdtm/lib/lock.c    |   81 +++++++++++++++++++++++++++++++++++++++++++++++
 test/zdtm/lib/zdtmtst.h |   12 +++++++
 3 files changed, 94 insertions(+), 1 deletions(-)
 create mode 100644 test/zdtm/lib/lock.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0023-zdtm-Add-task_waiter_-helpers-v2.patch
Type: text/x-patch
Size: 2818 bytes
Desc: not available
Url : http://openvz.org/pipermail/criu/attachments/20120607/53a56a9b/0023-zdtm-Add-task_waiter_-helpers-v2-0001.bin


More information about the CRIU mailing list