// Set cached_pid_ to 0, vforked_ to 1, and stash the previous value.
li t1, 0x80000000
lw t2, 20(t0)
sw t1, 20(t0)
li a0, (CLONE_VM | CLONE_VFORK | SIGCHLD)
li a1, 0 //uses a duplicate of the parent's stack
li a2, 0
li a3, 0
li a4, 0
li a7, __NR_clone
ecall
// Are we the child? Return if so.
bnez a0, L(not_child)
ret
// Not the child: restore the previous cached_pid_/vforked_ values
// and then report syscall success/failure as normal.
L(not_child):
sw t2, 20(t0)
DO_SYSCALL_RETURN
END(vfork)
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-06-28)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.