summaryrefslogtreecommitdiff
path: root/lib/libc/arch/sh
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2012-06-21 00:57:00 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2012-06-21 00:57:00 +0000
commit867c8588faf5fba418fc7c3a85aa2bd4c3327e01 (patch)
treee98c388fcdff4a138a38722ee463c1b12f6c133a /lib/libc/arch/sh
parent28222fd1268ab97426703666e99f70ed942e847b (diff)
__tfork() needs to set the stack address of the new thread in the kernel,
so that it can't get a signal while still running on the parent thread's stack. Also, pass in sizeof(struct __tfork) to provide forward compat when more members are added. This is an ABI change, so switch syscall numbers and bump lib majors this time. ok deraadt@ matthew@
Diffstat (limited to 'lib/libc/arch/sh')
-rw-r--r--lib/libc/arch/sh/sys/tfork_thread.S7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/libc/arch/sh/sys/tfork_thread.S b/lib/libc/arch/sh/sys/tfork_thread.S
index bfca155e1d0..49235c0b829 100644
--- a/lib/libc/arch/sh/sys/tfork_thread.S
+++ b/lib/libc/arch/sh/sys/tfork_thread.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: tfork_thread.S,v 1.1 2012/03/22 00:44:56 guenther Exp $ */
+/* $OpenBSD: tfork_thread.S,v 1.2 2012/06/21 00:56:59 guenther Exp $ */
/*
* Copyright (c) 2007 Miodrag Vallat.
@@ -20,7 +20,7 @@
#include "SYS.h"
/*
- * int __tfork_thread(const struct __tfork *param, void *stack, void (*func)(void *), void *arg);
+ * int __tfork_thread(const struct __tfork *param, size_t psize, void (*func)(void *), void *arg);
* r4 r5 r6 r7
*/
ENTRY(__tfork_thread)
@@ -39,9 +39,8 @@ ENTRY(__tfork_thread)
1:
/*
- * In child process: switch stack, invoke function, then exit.
+ * In child process: invoke function, then exit.
*/
- mov r5, sp
jsr @r6
mov r7, r4