Messages in this thread | | | Date | Wed, 25 Sep 2002 12:02:03 -0700 (PDT) | Subject | Re: cmpxchg in 2.5.38 | From | "David S. Miller" <> |
| |
From: Ingo Molnar <mingo@elte.hu> Date: Wed, 25 Sep 2002 10:26:34 +0200 (CEST)
yes. It's only this place in the code that ever modifies that word
I just realized... how would a crippled spinlock implementation protect the readers looking at the word?
The operation is decidely non-atomic, because only one side of the access is being synchronized.
This is another reason you can't use cmpxchg like this and expect every architecture to be able to do something reasonable.
Use instead some algorithm with xchg() which is supported on every platform. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |