« Previous | Next » 

Revision 9a39f854

ID9a39f854c77adfa04a463c13e2743dd88d3c7509
Parent cdb08f44
Child ea3f80bf

Added by Guido Trotter about 14 years ago

SharedLock: remove wrong assertion in code

r644 contained some cleanup code for LockSet. Among other things it removed a
syntax error that allowed an assertion that previously wan't really checked to
trigger. It turns out that even though the spirit of that assertion was correct
its actual implementation was wrong.

While it's true that no sharers must be waiting if an exclusive holder is not
present it might happen that when all the sharers wake up one of them releases
the lock before some other even has had a chance to run. In this case
__shr_wait would still be greater than 0, even if the sharer is not actually
waiting, just pending a wakeup to proceed.

Thus, removing the assertion in question.

Reviewed-by: imsnah

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences