mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 14:58:30 +00:00
Add strace to aarch64 vfork()
This commit is contained in:
parent
4f100d2aad
commit
20c794a353
2 changed files with 12 additions and 28 deletions
|
@ -91,7 +91,18 @@ vfork:
|
||||||
ldr w0,[x0,#:lo12:__hostos]
|
ldr w0,[x0,#:lo12:__hostos]
|
||||||
tbz x0,3,1f // bit 3 is xnu
|
tbz x0,3,1f // bit 3 is xnu
|
||||||
b fork // which doesn't support vfork()
|
b fork // which doesn't support vfork()
|
||||||
1: mov x8,#220 // __NR_clone
|
1:
|
||||||
|
|
||||||
|
#ifdef SYSDEBUG
|
||||||
|
stp x29,x30,[sp,-16]!
|
||||||
|
adrp x0,.Llog
|
||||||
|
add x0,x0,:lo12:.Llog
|
||||||
|
mov x29,sp
|
||||||
|
bl __stracef
|
||||||
|
ldp x29,x30,[sp],16
|
||||||
|
#endif
|
||||||
|
|
||||||
|
mov x8,#220 // __NR_clone
|
||||||
mov x0,#0x4111 // SIGCHLD | CLONE_VM | CLONE_VFORK
|
mov x0,#0x4111 // SIGCHLD | CLONE_VM | CLONE_VFORK
|
||||||
mov x1,#0
|
mov x1,#0
|
||||||
svc 0
|
svc 0
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
#ifndef COSMOPOLITAN_LIBC_SOCK_OVERLAPPED_H_
|
|
||||||
#define COSMOPOLITAN_LIBC_SOCK_OVERLAPPED_H_
|
|
||||||
#include "libc/nt/struct/overlapped.h"
|
|
||||||
#include "libc/thread/thread.h"
|
|
||||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
|
||||||
COSMOPOLITAN_C_START_
|
|
||||||
|
|
||||||
#define wsa_overlapped_cleanup_push(handle, overlap) \
|
|
||||||
{ \
|
|
||||||
struct WsaOverlappedCleanup wsa_overlapped_cleanup = {handle, overlap}; \
|
|
||||||
pthread_cleanup_push(wsa_overlapped_cleanup_callback, \
|
|
||||||
&wsa_overlapped_cleanup);
|
|
||||||
|
|
||||||
#define wsa_overlapped_cleanup_pop() \
|
|
||||||
pthread_cleanup_pop(false); \
|
|
||||||
}
|
|
||||||
|
|
||||||
struct WsaOverlappedCleanup {
|
|
||||||
int64_t handle;
|
|
||||||
struct NtOverlapped *overlap;
|
|
||||||
};
|
|
||||||
|
|
||||||
void wsa_overlapped_cleanup_callback(void *);
|
|
||||||
|
|
||||||
COSMOPOLITAN_C_END_
|
|
||||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
|
||||||
#endif /* COSMOPOLITAN_LIBC_SOCK_OVERLAPPED_H_ */
|
|
Loading…
Add table
Add a link
Reference in a new issue