Releases this mutex.
| 1914 | |
| 1915 | // Releases this mutex. |
| 1916 | void Unlock() { |
| 1917 | // Since the lock is being released the owner_ field should no longer be |
| 1918 | // considered valid. We don't protect writing to has_owner_ here, as it's |
| 1919 | // the caller's responsibility to ensure that the current thread holds the |
| 1920 | // mutex when this is called. |
| 1921 | has_owner_ = false; |
| 1922 | GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_unlock(&mutex_)); |
| 1923 | } |
| 1924 | |
| 1925 | // Does nothing if the current thread holds the mutex. Otherwise, crashes |
| 1926 | // with high probability. |
nothing calls this directly
no outgoing calls
no test coverage detected