Re:Landing a new syscall, part 1: What is futex?
by im3w1l on Wednesday February 09, 2022 @10:27AM
(#30273690)
The articles code for mutex_lock is this
Now consider what happens if someone calls it
my_mutex is copied into the mutex parameter. The mutex parameter is updated to locked. mutex_lock exits, which destroys the mutex variable. my_mutex still has the variable UNLOCKED.
[ Parent
| on HN ]
Re:Landing a new syscall, part 1: What is futex?
by mfilion on Wednesday February 09, 2022 @10:52AM
(#30274107)
Good catch, corrected!
Re:Landing a new syscall, part 1: What is futex?
by waynesonfire on Wednesday February 09, 2022 @11:26AM
(#30274544)
One more...
> We use &mutex as the first argument
Re:Landing a new syscall, part 1: What is futex?
by andrealmeid on Wednesday February 09, 2022 @01:23PM
(#30276167)
ops, fixed, thanks!