Prevent a xenagent timeout (and live kernel dump) on S3/S4 transition by
changing CXenIfaceCreator::Log to use TryEnterCriticalSection.
Otherwise, a timeout occurs when the service control handler fails to
return due to attempting to enter a critical section object that the
main service thread already owns while responding to the
control/shutdown xenstore watch.
Signed-off-by: Troy Crosley <troycrosley@gmail.com>
[Re-ordered if statement] Signed-off-by: Paul Durrant <paul@xen.org>