Prev: rwsem: wake queued readers when other readers are active
Next: rwsem: smaller wrappers around rwsem_down_failed_common
From: David Howells on 12 May 2010 08:40 Michel Lespinasse <walken(a)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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: David Howells on 19 May 2010 08:50
Michel Lespinasse <walken(a)google.com> wrote: > + * 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. */ The comma you've added after 'us' is wrong. That suggests that the implicit 'then' comes there. I take it you're a proponent of the Oxford/Harvard/serial comma? Apart from that miscellaneous grammatical difference, the patch is fine:-) David -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |