diff options
| author | 2017-02-20 08:42:46 +0000 | |
|---|---|---|
| committer | 2017-02-20 08:42:46 +0000 | |
| commit | 0d5f1b6af8b35d93fbe9c187a099b1eafdfbca8b (patch) | |
| tree | d5252b3082f0bb684939e259a232285c1b5adb7d /lib/libc | |
| parent | VMX: assert that the supplied instruction length matches what is expected for (diff) | |
| download | wireguard-openbsd-0d5f1b6af8b35d93fbe9c187a099b1eafdfbca8b.tar.xz wireguard-openbsd-0d5f1b6af8b35d93fbe9c187a099b1eafdfbca8b.zip | |
__tfork(3) returns the thread ID of the new thread in x0, not x1. The
value returned in x1 on __tfork(3) is always zero, which made the code
always fall into the child case.
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/arch/aarch64/sys/tfork_thread.S | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/arch/aarch64/sys/tfork_thread.S b/lib/libc/arch/aarch64/sys/tfork_thread.S index 333dd0461bb..5dda781adc2 100644 --- a/lib/libc/arch/aarch64/sys/tfork_thread.S +++ b/lib/libc/arch/aarch64/sys/tfork_thread.S @@ -1,4 +1,4 @@ -/* $OpenBSD: tfork_thread.S,v 1.1 2017/01/11 18:09:24 patrick Exp $ */ +/* $OpenBSD: tfork_thread.S,v 1.2 2017/02/20 08:42:46 patrick Exp $ */ /* * Copyright (c) 2005 Dale Rahn <drahn@openbsd.org> * @@ -28,7 +28,7 @@ ENTRY(__tfork_thread) bcs CERROR /* check if we are parent or child */ - cbz x1, 1f + cbz x0, 1f ret 1: |
