Messages in this thread |  | | | From | David Howells <> | | Subject | Re: [PATCH 07/12] rwsem: wake queued readers when writer blocks on active read lock | | Date | Wed, 12 May 2010 13:33:31 +0100 |
| |
Michel Lespinasse <walken@google.com> wrote:
> + /* if there are no active locks, wake the front queued process(es) up. > + * > + * or if we're called from a failed down_write(), and there were > + * already threads queued before us, and there are no active writers, > + * the lock must be read owned; try to wake any read locks that were > + * queued ahead of us. */
That looks weird. Can I suggest rewriting it thus:
/* If there are no active locks, wake the front queued process(es) up. * * Alternatively, if we're called from a failed down_write(), there * were already threads queued before us and there are no active * writers, the lock must be read owned; so we try to wake any read * locks that were queued ahead of us. */ David
|  |