Re: [PATCH 19/21] sysemu: add vm_start_hold/release

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Il 18/11/2013 13:25, Marc-André Lureau ha scritto:
> +static int start_hold;
> +
> +void vm_start_hold(void)
> +{
> +    start_hold++;
> +}
> +
> +void vm_start_release(void)
> +{
> +    start_hold--;
> +    vm_start();
> +}
> +
>  void vm_start(void)
>  {
> +    if (start_hold != 0) {
> +        return;
> +    }
> +

This is interesting.  I like it, but I think this sequence:

  vm_start_hold()
  vm_start_release()

should not call vm_start(), while this:

  vm_start_hold()
  vm_start()
  vm_start_release()

should call it.

Also, vm_start_hold() should assert that the VM is not running.

Paolo
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]