Skip to content

Commit

Permalink
Fix synchronization.tex typo
Browse files Browse the repository at this point in the history
  • Loading branch information
hanxu12 committed Mar 18, 2023
1 parent e7e4462 commit 33d09a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion synchronization/synchronization.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1461,7 +1461,7 @@ \section{Barriers}
Let's use a condition variable and then we will use a broadcast/signal functions to wake up the sleeping threads.

A reminder, a condition variable is similar to a house! Threads go there to sleep (\keyword{pthread\_cond\_wait}).
A threa can choose to wake up one thread (\keyword{pthread\_cond\_signal}) or all of them (\keyword{pthread\_cond\_broadcast}).
A thread can choose to wake up one thread (\keyword{pthread\_cond\_signal}) or all of them (\keyword{pthread\_cond\_broadcast}).
If there are no threads currently waiting then these two calls have no effect.

A condition variable version is usually similar to a busy loop incorrect solution - as we will show next.
Expand Down

0 comments on commit 33d09a6

Please sign in to comment.