debuggers.hg

changeset 21161:6c833a9ee3c4

mini-os: Fix xenbus_switch_state's transaction retry

When xenbus_switch_state has to retry the transaction which it just
created, it needs to recreate another one. Clearing xbt triggers it.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Apr 07 08:17:21 2010 +0100 (2010-04-07)
parents d7ee309d0e01
children 3376c90960e8
files extras/mini-os/xenbus/xenbus.c
line diff
     1.1 --- a/extras/mini-os/xenbus/xenbus.c	Wed Apr 07 08:16:15 2010 +0100
     1.2 +++ b/extras/mini-os/xenbus/xenbus.c	Wed Apr 07 08:17:21 2010 +0100
     1.3 @@ -154,8 +154,10 @@ char *xenbus_switch_state(xenbus_transac
     1.4          msg = xenbus_write(xbt, path, value);
     1.5  
     1.6  exit:
     1.7 -        if (xbt_flag)
     1.8 +        if (xbt_flag) {
     1.9              msg2 = xenbus_transaction_end(xbt, 0, &retry);
    1.10 +            xbt = XBT_NIL;
    1.11 +        }
    1.12          if (msg == NULL && msg2 != NULL)
    1.13              msg = msg2;
    1.14      } while (retry);