Sander Eikelenboom writes ("Re: [Xen-devel] Xenstore watch interface in the 
kernel"):
> Something I did ran into while trying to use xenstore, was that the
> callbacks don't give back the previous and current value.

Others have replied to this, and I agree with them, but: this makes me
think you are probably writing an incorrect algorithm or state
machine.

The correct way to use a xenstore watch is to treat it a bit like an
interrupt: your code should use it as a prompt to read the value(s) it
cares about.  (In a transaction, if multiple reads are needed.)

The update, which reads the xenstore keys and "makes it so", should be
idempotent.

Obviously your code needs to keep track of what situation it currently
implements, anyway.  So you shouldn't need to explicitly retain the
previous xenstore contents.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to