asm-generic: qrwlock: Document the spinlock fairness requirements
authorPalmer Dabbelt <palmer@rivosinc.com>
Thu, 14 Apr 2022 16:34:29 +0000 (09:34 -0700)
committerPalmer Dabbelt <palmer@rivosinc.com>
Wed, 11 May 2022 18:49:54 +0000 (11:49 -0700)
I could only find the fairness requirements documented as the C code,
this calls them out in a comment just to be a bit more explicit.

Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
include/asm-generic/qrwlock.h

index 7ae0ece..24ae09c 100644 (file)
@@ -2,6 +2,10 @@
 /*
  * Queue read/write lock
  *
+ * These use generic atomic and locking routines, but depend on a fair spinlock
+ * implementation in order to be fair themselves.  The implementation in
+ * asm-generic/spinlock.h meets these requirements.
+ *
  * (C) Copyright 2013-2014 Hewlett-Packard Development Company, L.P.
  *
  * Authors: Waiman Long <waiman.long@hp.com>