Skip to content

Commit 47d9787

Browse files
committed
Add some comments and update documentation link.
1 parent a9ac6e6 commit 47d9787

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ The course aims to equip students with the ability to:
5959
### Textbook
6060

6161
- [Slides](https://docs.google.com/presentation/d/1NMg08N1LUNDPuMxNZ-UMbdH13p8LXgMM3esbWRMowhU/edit?usp=sharing)
62+
- [Code Documentation](https://kaist-cp.github.io/cs431/cs431/)
6263
- References
6364
+ [The Art of Multiprocessor Programming](https://dl.acm.org/doi/book/10.5555/2385452)
6465
+ [The Crossbeam Library Documentation](https://docs.rs/crossbeam/latest/crossbeam/)
@@ -181,7 +182,7 @@ Ensure you are proficient with the following development tools:
181182
182183
- All assignments will be announced at the start of the semester.
183184
- Submit your solutions to <https://gg.kaist.ac.kr/course/19>.
184-
- Refer to the documentation at <https://www.fearless.systems/cs431/cs431_homework/>.
185+
- Refer to the documentation at <https://kaist-cp.github.io/cs431/cs431_homework/>.
185186
- You are **permitted** to use ChatGPT or other LLMs.
186187
187188

src/lock/mcsparkinglock.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ unsafe impl RawLock for McsParkingLock {
8989
// SAFETY: See safety of McsLock::unlock().
9090
drop(unsafe { Box::from_raw(node) });
9191
let next_ref = unsafe { &*next };
92+
93+
// It is important to clone the thread before unlocking, the next waiter,
94+
// because then the next waiter may free `next_ref`.
9295
let thread = next_ref.thread.clone();
9396
next_ref.locked.store(false, Release);
9497
thread.unpark();

0 commit comments

Comments
 (0)