Really set errno if __pthread_clone fails.

If r0 == 0, we're the child. If r0 > 0, we're the parent.
Otherwise set errno.

The __bionic_clone code I copy & pasted was wrong. This patch
fixes both.

Bug: 3461078
Change-Id: Ibb7d6cc7e54e666841f2f0dc59a141a0b31982e4
This commit is contained in:
Elliott Hughes
2013-02-12 16:07:06 -08:00
parent 558a8b1d3b
commit 9f878c2fca

View File

@@ -47,7 +47,7 @@ ENTRY(__pthread_clone)
# In parent, reload saved registers then either exit or set errno.
ldmfd sp!, {r4, r7}
bxne lr
bxpl lr
b __set_syscall_errno
1: # The child.
@@ -96,7 +96,7 @@ ENTRY(__bionic_clone)
# In the parent, reload saved registers then either exit or set errno.
ldmfd sp!, {r4, r5, r6, r7}
bxne lr
bxpl lr
b __set_syscall_errno
1: # The child.