aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/amd64/sys
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/amd64/sys')
-rw-r--r--lib/libc/amd64/sys/cerror.S28
-rw-r--r--lib/libc/amd64/sys/pipe.S6
-rw-r--r--lib/libc/amd64/sys/sigreturn.S6
-rw-r--r--lib/libc/amd64/sys/vfork.S28
4 files changed, 57 insertions, 11 deletions
diff --git a/lib/libc/amd64/sys/cerror.S b/lib/libc/amd64/sys/cerror.S
index 875f6db37219..2cbb0f94ab5b 100644
--- a/lib/libc/amd64/sys/cerror.S
+++ b/lib/libc/amd64/sys/cerror.S
@@ -33,16 +33,39 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: cerror.S,v 1.2 1994/08/13 14:00:26 davidg Exp $
+ * $Id: cerror.S,v 1.3 1995/01/23 01:29:43 davidg Exp $
*/
#if defined(SYSLIBC_RCS) && !defined(lint)
.text
- .asciz "$Id$"
+ .asciz "$Id: cerror.S,v 1.3 1995/01/23 01:29:43 davidg Exp $"
#endif /* SYSLIBC_RCS and not lint */
#include "SYS.h"
+#ifdef _THREAD_SAFE
+ /*
+ * Threaded version using __error().
+ */
+ .globl ___error
+ .type ___error,@function
+cerror:
+ pushl %eax
+#ifdef PIC
+ call PIC_PLT(___error)
+#else
+ call ___error
+#endif
+ popl %ecx
+ movl %ecx,(%eax)
+ movl $-1,%eax
+ movl $-1,%edx
+ ret
+
+#else /* _THREAD_SAFE */
+ /*
+ * Non-threaded version using global errno.
+ */
.globl _errno
cerror:
#ifdef PIC
@@ -56,3 +79,4 @@ cerror:
movl $-1,%eax
movl $-1,%edx
ret
+#endif /* _THREAD_SAFE */
diff --git a/lib/libc/amd64/sys/pipe.S b/lib/libc/amd64/sys/pipe.S
index cf3264c9c495..809445f0bec7 100644
--- a/lib/libc/amd64/sys/pipe.S
+++ b/lib/libc/amd64/sys/pipe.S
@@ -33,17 +33,17 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pipe.S,v 1.1 1994/08/05 01:18:46 wollman Exp $
+ * $Id: pipe.S,v 1.2 1995/01/23 01:29:57 davidg Exp $
*/
#if defined(SYSLIBC_RCS) && !defined(lint)
.text
- .asciz "$Id$"
+ .asciz "$Id: pipe.S,v 1.2 1995/01/23 01:29:57 davidg Exp $"
#endif /* SYSLIBC_RCS and not lint */
#include "SYS.h"
-SYSCALL(pipe)
+PSYSCALL(pipe)
movl 4(%esp),%ecx
movl %eax,(%ecx)
movl %edx,4(%ecx)
diff --git a/lib/libc/amd64/sys/sigreturn.S b/lib/libc/amd64/sys/sigreturn.S
index ac0ffd653471..6f3f571c616e 100644
--- a/lib/libc/amd64/sys/sigreturn.S
+++ b/lib/libc/amd64/sys/sigreturn.S
@@ -33,12 +33,12 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: sigreturn.S,v 1.1 1994/08/05 01:18:53 wollman Exp $
+ * $Id: sigreturn.S,v 1.2 1995/01/23 01:30:16 davidg Exp $
*/
#if defined(SYSLIBC_RCS) && !defined(lint)
.text
- .asciz "$Id$"
+ .asciz "$Id: sigreturn.S,v 1.2 1995/01/23 01:30:16 davidg Exp $"
#endif /* SYSLIBC_RCS and not lint */
#include "SYS.h"
@@ -53,5 +53,5 @@
.data; 1:; .long 0; .text; movl $1b,%eax; call mcount; popa ; nop
#endif /* PROF */
-SYSCALL(sigreturn)
+PSYSCALL(sigreturn)
ret
diff --git a/lib/libc/amd64/sys/vfork.S b/lib/libc/amd64/sys/vfork.S
index 06e3eb6a4812..341b75c97381 100644
--- a/lib/libc/amd64/sys/vfork.S
+++ b/lib/libc/amd64/sys/vfork.S
@@ -33,12 +33,12 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: Ovfork.S,v 1.1 1994/08/05 01:18:38 wollman Exp $
+ * $Id: Ovfork.S,v 1.2 1995/01/23 01:29:37 davidg Exp $
*/
#if defined(SYSLIBC_RCS) && !defined(lint)
.text
- .asciz "$Id$"
+ .asciz "$Id: Ovfork.S,v 1.2 1995/01/23 01:29:37 davidg Exp $"
#endif /* SYSLIBC_RCS and not lint */
#include "SYS.h"
@@ -63,7 +63,28 @@ vforkok:
cmpl $0,%edx /* child process? */
jne child /* yes */
jmp parent
-.globl _errno
+#ifdef _THREAD_SAFE
+ /*
+ * Threaded version using __error().
+ */
+ .globl ___error
+ .type ___error,@function
+verror:
+ pushl %eax
+#ifdef PIC
+ call PIC_PLT(___error)
+#else
+ call ___error
+#endif
+ popl %ecx
+ movl %ecx,(%eax)
+ movl $-1,%eax
+ movl $-1,%edx
+#else /* !_THREAD_SAFE */
+ /*
+ * Non-threaded version using global errno.
+ */
+ .globl _errno
verror:
#ifdef PIC
PIC_PROLOGUE
@@ -74,6 +95,7 @@ verror:
movl %eax,_errno
#endif
movl $-1,%eax
+#endif /* !_THREAD_SAFE */
jmp %ecx
child:
movl $0,%eax