Re: [PATCH 08/10] rwsem: down_read_critical infrastructure support
From: Michel Lespinasse
Date: Thu May 20 2010 - 19:30:20 EST
On Wed, May 19, 2010 at 6:34 AM, David Howells <dhowells@xxxxxxxxxx> wrote:
> Can I suggest you change this to:
>
> enum rwsem_waiter_type {
> RWSEM_WAITING_FOR_WRITE,
> RWSEM_WAITING_FOR_READ,
> RWSEM_WAITING_FOR_UNFAIR_READ
> };
>
> and then change:
>
>> unsigned int flags;
>
> to:
>
> enum rwsem_waiter_type type;
>
> and use this throughout. It simplifies some of the code too. See attached
> patch.
Makes perfect sense assuming we don't plan to add more flags in the future.
I'll use this in V4 series.
> - if (flags & RWSEM_UNFAIR)
> + if (type & RWSEM_WAITING_FOR_UNFAIR_READ)
if (type == RWSEM_WAITING_FOR_UNFAIR_READ)
--
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/