[XEN] Allow shutdown code to be set at most once per domain.

SIgned-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
kfraser@localhost.localdomain committed 2006-12-01 17:29:04 +00:00
1 parent ed6af790ae
commit 1016756b1d
1 file changed
+2 -2
+2 -2
View File
@@ -283,8 +283,8 @@ void domain_shutdown(struct domain *d, u8 reason)
if ( d->domain_id == 0 )
dom0_shutdown(reason);
d->shutdown_code = reason;
set_bit(_DOMF_shutdown, &d->domain_flags);
if ( !test_and_set_bit(_DOMF_shutdown, &d->domain_flags) )
d->shutdown_code = reason;
for_each_vcpu ( d, v )
vcpu_sleep_nosync(v);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.