mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 14:58:30 +00:00
Improve lock hierarchy
- NetBSD no longer needs a spin lock to create semaphores - Windows fork() now locks process manager in correct order
This commit is contained in:
parent
7ba9a73840
commit
d3a13e8d70
14 changed files with 73 additions and 71 deletions
|
@ -22,8 +22,10 @@
|
|||
/**
|
||||
* Destroys mutex.
|
||||
*
|
||||
* Destroying a mutex that's currently locked or being waited upon, will
|
||||
* result in undefined behavior.
|
||||
*
|
||||
* @return 0 on success, or error number on failure
|
||||
* @raise EINVAL if mutex is locked in our implementation
|
||||
*/
|
||||
errno_t pthread_mutex_destroy(pthread_mutex_t *mutex) {
|
||||
memset(mutex, -1, sizeof(*mutex));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue