Skip to content

Commit

Permalink
Remove statement that PTHREAD_MUTEX_INITIALIZER must be global/static
Browse files Browse the repository at this point in the history
  • Loading branch information
jtschuler committed Feb 22, 2024
1 parent 2a3195e commit a0ea1a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _slides/critical_concurrency.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ Remember CS 124/225! Appending to the head of a linked list, other edge cases, e

<vertical />

* `PTHREAD_MUTEX_INITIALIZER` only works for static initialization
* Use `pthread_mutex_init(&mtex, NULL)` in other cases
* `PTHREAD_MUTEX_INITIALIZER` initializes a mutex with default properties
* `pthread_mutex_init(&mtex, &attr)` allows specialized attributes
* Think of all critical/edge cases to test your queue/semamore
* Consider one thread that starts working really late
* Semamore is not a real term!
Expand Down

0 comments on commit a0ea1a7

Please sign in to comment.