Subject: Re: x86 instructions reordering
To: TLorD <tld@tld.digitalcurse.com>
From: TLorD <tld@tld.digitalcurse.com>
List: port-xen
Date: 03/25/2005 12:22:13
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Drats, forgot about the did_something/goto thing.

This makes the lock it a bit more unlikely, but still possible.
(by the way, you DID set did_something = 0 after again:, didn't you?)

What happens when
did_something = 1, goto again, just passed the a = shared_memory->a; line
send()

Another handle_event is run (after all, send_event() is run)? If so, you might
have a race condition in which the first writes new_b = b + 1, then the first
one goes new_b = b and you're out of sync again.
Is it ignored? then b falls behind a again.



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)

iD8DBQFCQ/RlMiWEUf7YMGERAvG7AKC1SZHiHHNPQxUQ7K5u2u+cDIrAmgCg0Ub/
xwUypGpLN+RBriqNrslWYaI=
=j1/P
-----END PGP SIGNATURE-----