提交 b4b9743c 编写于 作者: R Rich Felker

fix mips-specific bug in synccall (too little space for signal mask)

switch to the new __block_all_sigs/__restore_sigs internal API to
clean up the code too.
上级 3c0501d2
...@@ -43,7 +43,7 @@ void __synccall(void (*func)(void *), void *ctx) ...@@ -43,7 +43,7 @@ void __synccall(void (*func)(void *), void *ctx)
pthread_t self; pthread_t self;
struct sigaction sa; struct sigaction sa;
struct chain *next; struct chain *next;
uint64_t oldmask; sigset_t oldmask;
if (!libc.threads_minus_1) { if (!libc.threads_minus_1) {
func(ctx); func(ctx);
...@@ -52,8 +52,7 @@ void __synccall(void (*func)(void *), void *ctx) ...@@ -52,8 +52,7 @@ void __synccall(void (*func)(void *), void *ctx)
__inhibit_ptc(); __inhibit_ptc();
__syscall(SYS_rt_sigprocmask, SIG_BLOCK, SIGALL_SET, __block_all_sigs(&oldmask);
&oldmask, _NSIG/8);
sem_init(&chaindone, 0, 0); sem_init(&chaindone, 0, 0);
sem_init(&chainlock, 0, 1); sem_init(&chainlock, 0, 1);
...@@ -86,8 +85,7 @@ void __synccall(void (*func)(void *), void *ctx) ...@@ -86,8 +85,7 @@ void __synccall(void (*func)(void *), void *ctx)
sem_post(&cur->sem); sem_post(&cur->sem);
} }
__syscall(SYS_rt_sigprocmask, SIG_SETMASK, __restore_sigs(&oldmask);
&oldmask, 0, _NSIG/8);
__release_ptc(); __release_ptc();
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册