Subject: Re: x86 instructions reordering
To: TLorD <firstname.lastname@example.org>
From: TLorD <email@example.com>
Date: 03/25/2005 12:22:13
-----BEGIN PGP SIGNED MESSAGE-----
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
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)
-----END PGP SIGNATURE-----