summaryrefslogtreecommitdiff
path: root/usr/src/lib
diff options
context:
space:
mode:
authordm120769 <none@none>2007-11-28 17:32:33 -0800
committerdm120769 <none@none>2007-11-28 17:32:33 -0800
commitc4ace179ef00035909e70fe3e4a49eb1c467eab1 (patch)
tree5b73ac977263e73dbd725ae9b6db8b8fc2037e33 /usr/src/lib
parent9b71d8e9ca970799d903211510ad5fad6c5afcfa (diff)
downloadillumos-gate-c4ace179ef00035909e70fe3e4a49eb1c467eab1.tar.gz
backout 6580293: causes 6635129
Diffstat (limited to 'usr/src/lib')
-rw-r--r--usr/src/lib/libc/amd64/sys/door.s14
-rw-r--r--usr/src/lib/libc/i386/sys/door.s25
-rw-r--r--usr/src/lib/libc/sparc/sys/door.s24
3 files changed, 26 insertions, 37 deletions
diff --git a/usr/src/lib/libc/amd64/sys/door.s b/usr/src/lib/libc/amd64/sys/door.s
index 7ab1a747e6..e1df3c8db4 100644
--- a/usr/src/lib/libc/amd64/sys/door.s
+++ b/usr/src/lib/libc/amd64/sys/door.s
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,7 +20,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -99,7 +100,7 @@
door_restart:
movq $DOOR_RETURN, %r9 /* subcode */
SYSTRAP_RVAL1(door)
- jb 3f /* errno is set */
+ jb 2f /* errno is set */
/*
* On return, we're serving a door_call. Our stack looks like this:
*
@@ -126,19 +127,16 @@ door_restart:
movq DOOR_DESC_SIZE(%rsp), %r8
movq DOOR_PC(%rsp), %rax
call *%rax
-2:
/* Exit the thread if we return here */
movq $0, %rdi
call _thr_terminate
/* NOTREACHED */
-3:
+2:
/*
* Error during door_return call. Repark the thread in the kernel if
* the error code is EINTR (or ERESTART) and this lwp is still part
* of the same process.
*/
- cmpl $EEXIST, %eax /* exit if EEXIST is returned */
- je 2b
cmpl $ERESTART, %eax /* ERESTART is same as EINTR */
jne 3f
movl $EINTR, %eax
diff --git a/usr/src/lib/libc/i386/sys/door.s b/usr/src/lib/libc/i386/sys/door.s
index c36a5f3232..b2a42587d6 100644
--- a/usr/src/lib/libc/i386/sys/door.s
+++ b/usr/src/lib/libc/i386/sys/door.s
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,7 +20,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -147,7 +148,7 @@
door_restart:
SYSTRAP_RVAL1(door)
- jb 3f /* errno is set */
+ jb 2f /* errno is set */
/*
* On return, we're serving a door_call. Our stack looks like this:
*
@@ -176,13 +177,11 @@ door_restart:
/* Call the door server function now */
movl DOOR_PC(%esp), %eax
call *%eax
-
-2:
/* Exit the thread if we return here */
pushl $0
call _thr_terminate
/* NOTREACHED */
-3:
+2:
/*
* Error during door_return call. Repark the thread in the kernel if
* the error code is EINTR (or ERESTART) and this lwp is still part
@@ -192,14 +191,12 @@ door_restart:
* corrupted by a partial door call, so we refresh the system call
* arguments.
*/
- cmpl $EEXIST, %eax /* exit this thread if EEXIST */
- je 2b
cmpl $ERESTART, %eax /* ERESTART is same as EINTR */
- jne 4f
+ jne 3f
movl $EINTR, %eax
-4:
+3:
cmpl $EINTR, %eax /* interrupted while waiting? */
- jne 5f /* if not, return the error */
+ jne 4f /* if not, return the error */
_prologue_
call _private_getpid /* get current process id */
movl _daref_(door_create_pid), %edx
@@ -207,7 +204,7 @@ door_restart:
_epilogue_
cmpl %eax, %edx /* same process? */
movl $EINTR, %eax /* if no, return EINTR (child of forkall) */
- jne 5f
+ jne 4f
movl $0, 4(%esp) /* clear arguments and restart */
movl $0, 8(%esp)
@@ -216,7 +213,7 @@ door_restart:
movl %edi, 20(%esp) /* refresh ssize */
movl $DOOR_RETURN, 24(%esp) /* refresh syscall subcode */
jmp door_restart
-5:
+4:
/* Something bad happened during the door_return */
addl $28, %esp
popl %esi
diff --git a/usr/src/lib/libc/sparc/sys/door.s b/usr/src/lib/libc/sparc/sys/door.s
index 89e7452f6d..3b1abf187e 100644
--- a/usr/src/lib/libc/sparc/sys/door.s
+++ b/usr/src/lib/libc/sparc/sys/door.s
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,7 +20,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -99,7 +100,7 @@
door_restart:
mov DOOR_RETURN, %o5 /* subcode */
SYSTRAP_RVAL1(door)
- bcs,pn %icc, 3f /* errno is set */
+ bcs,pn %icc, 2f /* errno is set */
ld [%sp + DOOR_SERVERS], %g1 /* (delay) load nservers */
/*
* On return, we're serving a door_call. Our stack looks like this:
@@ -138,27 +139,20 @@ door_restart:
jmpl %g1, %o7
ldn [%sp + DOOR_DESC_SIZE], %o4
-2:
/* Exit the thread if we return here */
call _thr_terminate
mov %g0, %o0
/* NOTREACHED */
-
-3:
+2:
/*
* Error during door_return call. Repark the thread in the kernel if
* the error code is EINTR (or ERESTART) and this lwp is still part
- * of the same process. If error is EEXIST then we don't need
- * this server thread.
+ * of the same process.
*/
- cmp %o0, EEXIST
- be 2b
- nop
cmp %o0, ERESTART /* ERESTART is same as EINTR */
- be,a 4f
+ be,a 3f
mov EINTR, %o0
-
-4:
+3:
cmp %o0, EINTR /* interrupted while waiting? */
bne __cerror /* if not, return the error */
nop