Skip to content

Commit

Permalink
Add comment why MutexUnlock makes unrealistically strong assumptions.
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-schwarz committed Aug 4, 2022
1 parent d75d664 commit 11891d4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions spin/pthread.base.pml
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ inline __MutexLock(thread_id, x) {
}
}

// This makes a strong assumption! If other threads are waiting for the mutex, they get it before we can attempt to
// relock the mutex.
// This is not really what happens for pthreads!
inline MutexUnlock(x) {
atomic {
if
Expand Down

0 comments on commit 11891d4

Please sign in to comment.