mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 14:58:30 +00:00
Allow user to override pthread mutex and cond
This commit is contained in:
parent
4705705548
commit
55b7aa1632
54 changed files with 216 additions and 102 deletions
|
@ -52,7 +52,7 @@ extern pthread_mutex_t __sig_worker_lock;
|
|||
|
||||
static void sys_execve_nt_abort(sigset_t sigmask) {
|
||||
_pthread_unlock();
|
||||
pthread_mutex_unlock(&__sig_worker_lock);
|
||||
_pthread_mutex_unlock(&__sig_worker_lock);
|
||||
__sig_unblock(sigmask);
|
||||
}
|
||||
|
||||
|
@ -61,8 +61,8 @@ textwindows int sys_execve_nt(const char *program, char *const argv[],
|
|||
|
||||
// execve() needs to be @asyncsignalsafe
|
||||
sigset_t sigmask = __sig_block();
|
||||
pthread_mutex_lock(&__sig_worker_lock); // order matters
|
||||
_pthread_lock(); // order matters
|
||||
_pthread_mutex_lock(&__sig_worker_lock); // order matters
|
||||
_pthread_lock(); // order matters
|
||||
|
||||
// new process should be a child of our parent
|
||||
int64_t hParentProcess;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue