How Mutex works? mark...

mutex is just an integer in memory. But how it works?

  1. atomic
  2. memory barrier
  3. system call

1.https://mortoray.com/2019/02/20/how-does-a-mutex-work-what-does-it-cost/
2. https://preshing.com/20150402/you-can-do-any-kind-of-atomic-read-modify-write-operation/
3. https://eli.thegreenplace.net/2018/basics-of-futexes/

你可能感兴趣的:(c/c++,kernel)