mirage/mirage-platform — pull request #56 by djs55 (2013-08-12 10:33:49+00:00)
Title: xen: we must have at-most-one xenstore client

The domain has a single ring which must be shared amongst all
threads who want xenstore access. The sharing is done by the
xenstore client (Xs_client_lwt) which maintains all the necessary
tables mapping request ids to calling threads and serialising
access to the shared ring contents. We must make sure that only
one client is ever created.

In the recent refactoring all users of xenstore must get themselves
a handle by calling 'make ()'. Unfortunately every thread created
a fresh xenstore client. The fix is to cache the first client that
is created and return that to future callers.

Signed-off-by: David Scott