about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/i386/setcontext.S
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-07-31 20:57:24 +0000
committerUlrich Drepper <drepper@redhat.com>2001-07-31 20:57:24 +0000
commite14b1447804c705c7eb3c30b421acbf728310213 (patch)
tree391bb7ba360e773c43bc4f324e1ca688b45e1c5a /sysdeps/unix/sysv/linux/i386/setcontext.S
parentad71126b24491c31fd99b4ca8010cd1363f1c016 (diff)
downloadglibc-e14b1447804c705c7eb3c30b421acbf728310213.tar.gz
glibc-e14b1447804c705c7eb3c30b421acbf728310213.tar.xz
glibc-e14b1447804c705c7eb3c30b421acbf728310213.zip
Update.
	* sysdeps/unix/sysv/linux/i386/getcontext.S: Don't touch the %gs
	register so that contexts can be used in different threads.
	* sysdeps/unix/sysv/linux/i386/setcontext.S: Likewise.
	* sysdeps/unix/sysv/linux/i386/swapcontext.S: Likewise.
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386/setcontext.S')
-rw-r--r--sysdeps/unix/sysv/linux/i386/setcontext.S5
1 files changed, 2 insertions, 3 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/setcontext.S b/sysdeps/unix/sysv/linux/i386/setcontext.S
index 985212310e..58a122fc28 100644
--- a/sysdeps/unix/sysv/linux/i386/setcontext.S
+++ b/sysdeps/unix/sysv/linux/i386/setcontext.S
@@ -48,10 +48,9 @@ ENTRY(__setcontext)
 	movl	oFPREGS(%eax), %ecx
 	fldenv	(%ecx)
 
-	/* Restore the FS and GS segment registers.  */
-	movl	oGS(%eax), %edx
+	/* Restore the FS segment register.  We don't touch the GS register
+	   since it is used for threads.  */
 	movl	oFS(%eax), %ecx
-	movw	%dx, %gs
 	movw	%cx, %fs
 
 	/* Load the new stack pointer.  */