monitor: let suspend_cnt be thread safe
commitdf152fb950e3e00d0186cbdc412dc8ddcc618621
authorPeter Xu <peterx@redhat.com>
Fri, 9 Mar 2018 08:59:55 +0000 (9 16:59 +0800)
committerEric Blake <eblake@redhat.com>
Mon, 19 Mar 2018 19:58:37 +0000 (19 14:58 -0500)
treec57d0301cf69e0d82dc34581ebc8864b3a4727e1
parent546aa56674305a4ab45bea4f36956651fd892b04
monitor: let suspend_cnt be thread safe

Monitor code now can be run in more than one thread.  Let it be thread
safe when accessing suspend_cnt counter.

Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20180309090006.10018-13-peterx@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
monitor.c