diff for duplicates of <20050120161450.GC13812@elte.hu> diff --git a/a/1.txt b/N1/1.txt index a48c818..cb848f8 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -42,10 +42,10 @@ Signed-off-by: Ingo Molnar <mingo@elte.hu> * write_can_lock - would write_trylock() succeed? * @lock: the rwlock in question. */ --#define write_can_lock(x) ((x)->lock = RW_LOCK_BIAS) +-#define write_can_lock(x) ((x)->lock == RW_LOCK_BIAS) +static inline int write_can_lock(rwlock_t *rw) +{ -+ return atomic_read((atomic_t *)&rw->lock) = RW_LOCK_BIAS; ++ return atomic_read((atomic_t *)&rw->lock) == RW_LOCK_BIAS; +} /* diff --git a/a/content_digest b/N1/content_digest index 2048870..9818179 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -10,7 +10,7 @@ "ref\020050120161259.GB13812@elte.hu\0" "From\0Ingo Molnar <mingo@elte.hu>\0" "Subject\0[patch] stricter type-checking rwlock primitives, x86\0" - "Date\0Thu, 20 Jan 2005 16:14:50 +0000\0" + "Date\0Thu, 20 Jan 2005 17:14:50 +0100\0" "To\0Linus Torvalds <torvalds@osdl.org>\0" "Cc\0Peter Chubb <peterc@gelato.unsw.edu.au>" Chris Wedgwood <cw@f00f.org> @@ -70,10 +70,10 @@ " * write_can_lock - would write_trylock() succeed?\n" " * @lock: the rwlock in question.\n" " */\n" - "-#define write_can_lock(x) ((x)->lock = RW_LOCK_BIAS)\n" + "-#define write_can_lock(x) ((x)->lock == RW_LOCK_BIAS)\n" "+static inline int write_can_lock(rwlock_t *rw)\n" "+{\n" - "+\treturn atomic_read((atomic_t *)&rw->lock) = RW_LOCK_BIAS;\n" + "+\treturn atomic_read((atomic_t *)&rw->lock) == RW_LOCK_BIAS;\n" "+}\n" " \n" " /*\n" @@ -98,4 +98,4 @@ " static inline int _raw_read_trylock(rwlock_t *lock)\n" { -6b90e2ae1ac972f7f12b711136d8914fc276e5c427e2b22ddd882e2b67c50f5f +4f068084dfa9bcd2e83d3c82a619bb4d7884b930e05f572469e9cc8fd89bc6b7
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.