Created
October 1, 2015 18:59
-
-
Save supermartian/207b3b0ec81f56da6b8e to your computer and use it in GitHub Desktop.
pthread_mutex_lock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pthread mutex lock comes with different types: | |
1. private: process only | |
2. shared: cross the process boundary | |
Private: | |
Spins in the userspace for a while, after a timeout, goes to futex. In this way it saves some system calls. | |
Shared: | |
Goes to futex directly. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment