mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
Release pledge.com 1.7 and landlockmake.com 1.3
- pledge("chown") now supported - pledge("stdio") now allows killing self - Write tests for pselect() and ppoll()
This commit is contained in:
parent
255d834f8f
commit
ce588dd56b
19 changed files with 190 additions and 39 deletions
|
@ -354,8 +354,9 @@ static wontreturn void NetbsdThreadMain(void *arg, // rdi
|
|||
int *ztid, // r8
|
||||
int *ptid) { // r9
|
||||
int ax, dx;
|
||||
ax = *tid;
|
||||
*ptid = ax;
|
||||
// TODO(jart): Why are we seeing flakes where *tid is zero?
|
||||
// ax = *tid;
|
||||
ax = sys_gettid();
|
||||
*ctid = ax;
|
||||
func(arg, ax);
|
||||
// we no longer use the stack after this point
|
||||
|
@ -402,6 +403,7 @@ static int CloneNetbsd(int (*func)(void *, int), char *stk, size_t stksz,
|
|||
sp -= sizeof(int);
|
||||
sp = sp & -alignof(int);
|
||||
tid = (int *)sp;
|
||||
*tid = 0;
|
||||
|
||||
// align the stack
|
||||
sp = sp & -16;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue