xenlight: use an asynchronous way to report the outcome of asynchronous libxl calls
xenlight: use an asynchronous way to report the outcome of asynchronous libxl calls

Sometimes an asynchronous libxl call may return and call back before the
initiating function returns. When this happens, the callback occurs on the same
thread as the initiating function and must not block.

We used to use the synchronous Event module to pass the result from the
callback back to the initiator, which does not work in this case. We replace it
by a custom event module with blocking reads and non-blocking writes.

Signed-off-by: Rob Hoes <8783b3376fb07d39edffc8d7da68a6de3874a7e6@citrix.com>

euanh/xenopsd,djs55/xenopsd,thomassa/xenopsd,euanh/xenopsd,cheng--zhang/xenopsd,johnelse/xenopsd,koushikcgit/xenopsd,johnelse/xenopsd,koushikcgit/xenopsd,djs55/xenopsd,thomassa/xenopsd,thomassa/xenopsd,johnelse/xenopsd,koushikcgit/xenopsd,cheng--zhang/xenopsd,djs55/xenopsd,cheng--zhang/xenopsd,euanh/xenopsd