mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-30 01:02:29 +00:00
Improve multithreading
This commit is contained in:
parent
d3167126aa
commit
30afd6ddbb
38 changed files with 752 additions and 174 deletions
|
@ -396,9 +396,7 @@ static textwindows int __sig_killer(struct PosixThread *pt, int sig, int sic) {
|
|||
textwindows int __sig_kill(struct PosixThread *pt, int sig, int sic) {
|
||||
int rc;
|
||||
BLOCK_SIGNALS;
|
||||
_pthread_ref(pt);
|
||||
rc = __sig_killer(pt, sig, sic);
|
||||
_pthread_unref(pt);
|
||||
ALLOW_SIGNALS;
|
||||
return rc;
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@ int sigaltstack(const struct sigaltstack *neu, struct sigaltstack *old) {
|
|||
} else {
|
||||
rc = sigaltstack_cosmo(neu, old);
|
||||
}
|
||||
STRACE("sigaltstack(%s, [%s]) → %d% m", DescribeSigaltstk(0, neu),
|
||||
DescribeSigaltstk(0, old), rc);
|
||||
STRACE("sigaltstack(%s, [%s]) → %d% m", DescribeSigaltstack(0, neu),
|
||||
DescribeSigaltstack(0, old), rc);
|
||||
return rc;
|
||||
}
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
#include "libc/mem/alloca.h"
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
const char *DescribeSigaltstk(char[128], int, const struct sigaltstack *);
|
||||
#define DescribeSigaltstk(rc, ss) DescribeSigaltstk(alloca(128), rc, ss)
|
||||
const char *DescribeSigaltstack(char[128], int, const struct sigaltstack *);
|
||||
#define DescribeSigaltstack(rc, ss) DescribeSigaltstack(alloca(128), rc, ss)
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_SIGALTSTACK_INTERNAL_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue