mailing list of musl libc
 help / color / mirror / code / Atom feed
c56e9fbdc4ff06251daa76cbae226b6e944d925f blob 534 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
 
#include "pthread_impl.h"

int pthread_mutex_destroy(pthread_mutex_t *mutex)
{
	/* If the mutex being destroyed is process-shared and has nontrivial
	 * type (tracking ownership), it might be in the pending slot of a
	 * robust_list; wait for quiescence. */
	if (mutex->_m_type > 128) __vm_wait();

	/* Setup a non-robust errorchecking mutex in ownerdead state so
	 * use after destruction can be trapped. */
	mutex->_m_type = 3;
	mutex->_m_prev = mutex->_m_next = 0;
	mutex->_m_lock = 0x7fffffff;
	mutex->_m_count = 0;

	return 0;
}
debug log:

solving c56e9fbd ...
found c56e9fbd in https://inbox.vuxu.org/musl/20240121034301.GZ4163@brightrain.aerifal.cx/
found 8d1bf77b in https://git.vuxu.org/mirror/musl/
preparing index
index prepared:
100644 8d1bf77b879212256111446c657209dd7a5cd73c	src/thread/pthread_mutex_destroy.c

applying [1/1] https://inbox.vuxu.org/musl/20240121034301.GZ4163@brightrain.aerifal.cx/
diff --git a/src/thread/pthread_mutex_destroy.c b/src/thread/pthread_mutex_destroy.c
index 8d1bf77b..c56e9fbd 100644

Checking patch src/thread/pthread_mutex_destroy.c...
Applied patch src/thread/pthread_mutex_destroy.c cleanly.

index at:
100644 c56e9fbdc4ff06251daa76cbae226b6e944d925f	src/thread/pthread_mutex_destroy.c

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).