RE: [Linux-ia64] spin_unlock() problem

David Mosberger
2003-04-08T00:15:51Z

>>>>> On Mon, 7 Apr 2003 16:38:03 -0700, "Chen, Kenneth W" <kenneth.w.chen@intel.com> said:

Ken> To make it to work correctly, I think one needs something like the
Ken> following:
Ken> --- a Mon Apr 7 16:34:51 2003
Ken> +++ b Mon Apr 7 16:35:11 2003
Ken> @@ -3,11 +3,11 @@
Ken> spin_lock(&bleh);
Ken> *a = foo;
Ken> spin_unlock(&bleh);
Ken> - *b = bar;
Ken> + REL_SEMANTICS(*b) = bar;
Ken> }

Ken> cpu2()
Ken> {
Ken> - if (*b = bar)
Ken> + if (ACQ_SEMANTICS(*b) = bar)
Ken> boink(*a);
Ken> }

Which is exactly what "volatile" would do. Unfortunately, this
"trick" works only on ia64, so it does not solve the problem for all
Linux platforms.

--david