Re: [PATCH] 2.5.27 spinlock

Rusty Russell (rusty@rustcorp.com.au)
Wed, 24 Jul 2002 14:40:18 +1000


On Mon, 22 Jul 2002 12:50:22 +0200
Marcin Dalecki <dalecki@evision.ag> wrote:

> - Add missing _raw_write_trylock() definitions for the UP preemption case.
>
> - Replace tons of georgeous macros for the UP preemption case with
> static inline functions. Much nicer to look at and more adequate then
> ({ xxxx }) in this case.

Martin, this patch is wrong, obvious from casual reading:

> -#define spin_trylock_bh(lock) ({ int __r; local_bh_disable();\
> +#define spin_trylock_bh(lock) do { int __r; local_bh_disable();\
> __r = spin_trylock(lock); \
> if (!__r) local_bh_enable(); \
> - __r; })
> + __r; } while (0)

I know you're smarter than this Martin 8)

Rusty.
PS. If you want them re-xmitted to Linus, send to trivial@rustcorp.com.au...

-- 
   there are those who do and those who hang on and you don't see too
   many doers quoting their contemporaries.  -- Larry McVoy
-
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/