diff options
Diffstat (limited to 'linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S')
-rw-r--r-- | linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S b/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S index e4ea9180cf..bcfcedfc2d 100644 --- a/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S +++ b/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S @@ -22,7 +22,12 @@ .text ENTRY(__vfork) ld [%g6 + MULTIPLE_THREADS_OFFSET], %o0 +#ifdef SHARED + cmp %o0, 0 bne HIDDEN_JUMPTARGET (__fork) +#else + brnz,pn %o0, 1f +#endif mov __NR_vfork, %g1 ta 0x6d bcs,pn %xcc, __syscall_error_handler @@ -30,6 +35,11 @@ ENTRY(__vfork) sub %o1, 1, %o1 retl and %o0, %o1, %o0 +#ifndef SHARED +1: mov %o7, %g1 + call HIDDEN_JUMPTARGET(__fork) + mov %g1, %o7 +#endif SYSCALL_ERROR_HANDLER PSEUDO_END (__vfork) libc_hidden_def (__vfork) |