sync with OpenBSD -current

This commit is contained in:
purplerain 2024-03-28 05:02:39 +00:00
parent 0189975fb5
commit cc5edceac3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
87 changed files with 1329 additions and 4278 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: tfork_thread.S,v 1.5 2023/12/10 16:45:52 deraadt Exp $ */
/* $OpenBSD: tfork_thread.S,v 1.6 2024/03/27 20:03:29 miod Exp $ */
/*
* Copyright (c) 2007 Miodrag Vallat.
@ -24,13 +24,7 @@
* r4 r5 r6 r7
*/
ENTRY(__tfork_thread)
#if SYS___tfork >= 128
mov.l .LSYS___tfork, r0
#else
mov #SYS___tfork, r0
#endif
99: trapa #0x80
PINSYSCALL(SYS___tfork, 99b)
systrap SYS___tfork
bf 9f
tst r0, r0
@ -42,6 +36,8 @@ ENTRY(__tfork_thread)
rts
nop
systrap_data SYS___tfork
1:
/*
* In child process: invoke function, then exit.
@ -49,26 +45,13 @@ ENTRY(__tfork_thread)
jsr @r6
mov r7, r4
#if SYS___threxit >= 128
mov.l .LSYS___threxit, r0
#else
mov #SYS___threxit, r0
#endif
98: trapa #0x80
PINSYSCALL(SYS___threxit, 98b)
systrap SYS___threxit
systrap_data SYS___threxit
9:
/*
* System call failure.
*/
SET_ERRNO_AND_RETURN
.align 2
#if SYS___tfork >= 128
.LSYS___tfork: .long SYS___tfork
#endif
#if SYS___threxit >= 128
.LSYS___threxit: .long SYS___threxit
#endif
SET_ERRNO_AND_RETURN(__tfork)
SET_ENTRY_SIZE(__tfork_thread)