[CRIU] [PATCH 11/19] parasite: Prepare struct tid_state_s for daemonization

Cyrill Gorcunov gorcunov at openvz.org
Tue Feb 26 08:08:53 EST 2013


When parasite will be a daemon we need a path to

 - communicate with it from main driver (crtools itsef),
   for which new PARASITE_CMDs will be used

 - each daemon needs own stack to work in parallel with
   other daemons, thus struct tid_state_s (which is allocated
   dynamically on parasite bootstrap) now has a space for
   stack

 - while tid_state_s::tid member is convenient to use inside
   parasite code itself, in case of dumpee being running in
   PID namespace the main diver need an unique key to distinguish
   threads, so we introduce tid_state_s::global, where daemon
   driver will keep own keys for thread lookup

 - @cmd/@ack/@ret will serve a communication channel with a daemon

This patch is preporatiory one for further changes.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 include/parasite.h | 27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0011-parasite-Prepare-struct-tid_state_s-for-daemonizatio.patch
Type: text/x-patch
Size: 1085 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20130226/0f4e256b/attachment.bin>


More information about the CRIU mailing list