MOVQ $0, err+72(FP)
RET
+// func rawVforkSyscall(trap, a1 uintptr) (r1, err uintptr)
+TEXT ·rawVforkSyscall(SB),NOSPLIT,$0-32
+ MOVQ a1+8(FP), DI
+ MOVQ $0, SI
+ MOVQ $0, DX
+ MOVQ $0, R10
+ MOVQ $0, R8
+ MOVQ $0, R9
+ MOVQ trap+0(FP), AX // syscall entry
+ POPQ R12 // preserve return address
+ SYSCALL
+ PUSHQ R12
+ CMPQ AX, $0xfffffffffffff001
+ JLS ok2
+ MOVQ $-1, r1+16(FP)
+ NEGQ AX
+ MOVQ AX, err+24(FP)
+ RET
+ok2:
+ MOVQ AX, r1+16(FP)
+ MOVQ $0, err+24(FP)
+ RET
+
// func gettimeofday(tv *Timeval) (err uintptr)
TEXT ·gettimeofday(SB),NOSPLIT,$0-16
MOVQ tv+0(FP), DI
// About to call fork.
// No more allocation or calls of non-assembly functions.
runtime_BeforeFork()
- if runtime.GOARCH == "s390x" {
+ switch {
+ case runtime.GOARCH == "amd64" && sys.Cloneflags&CLONE_NEWUSER == 0:
+ r1, err1 = rawVforkSyscall(SYS_CLONE, uintptr(SIGCHLD|CLONE_VFORK|CLONE_VM)|sys.Cloneflags)
+ case runtime.GOARCH == "s390x":
r1, _, err1 = RawSyscall6(SYS_CLONE, 0, uintptr(SIGCHLD)|sys.Cloneflags, 0, 0, 0, 0)
- } else {
+ default:
r1, _, err1 = RawSyscall6(SYS_CLONE, uintptr(SIGCHLD)|sys.Cloneflags, 0, 0, 0, 0, 0)
}
if err1 != 0 {
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
+
+func rawVforkSyscall(trap, a1 uintptr) (r1 uintptr, err Errno) {
+ panic("not implemented")
+}
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint64(length)
}
+
+func rawVforkSyscall(trap, a1 uintptr) (r1 uintptr, err Errno)
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
+
+func rawVforkSyscall(trap, a1 uintptr) (r1 uintptr, err Errno) {
+ panic("not implemented")
+}
SYS_EPOLL_CREATE = 1042
SYS_EPOLL_WAIT = 1069
)
+
+func rawVforkSyscall(trap, a1 uintptr) (r1 uintptr, err Errno) {
+ panic("not implemented")
+}
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint64(length)
}
+
+func rawVforkSyscall(trap, a1 uintptr) (r1 uintptr, err Errno) {
+ panic("not implemented")
+}
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
+
+func rawVforkSyscall(trap, a1 uintptr) (r1 uintptr, err Errno) {
+ panic("not implemented")
+}
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint64(length)
}
+
+func rawVforkSyscall(trap, a1 uintptr) (r1 uintptr, err Errno) {
+ panic("not implemented")
+}
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint64(length)
}
+
+func rawVforkSyscall(trap, a1 uintptr) (r1 uintptr, err Errno) {
+ panic("not implemented")
+}