]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Tue, 31 Jul 2001 20:57:24 +0000 (20:57 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 31 Jul 2001 20:57:24 +0000 (20:57 +0000)
* 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.

ChangeLog
linuxthreads/ChangeLog
sysdeps/unix/sysv/linux/i386/getcontext.S
sysdeps/unix/sysv/linux/i386/setcontext.S
sysdeps/unix/sysv/linux/i386/swapcontext.S

index bca582b88704afd9947e839da42b209d425c6533..cc01d033d9409e4016d15f6e09d278463d7bcc4f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2001-07-31  Ulrich Drepper  <drepper@redhat.com>
 
+       * 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.
+
        * sysdeps/unix/sysv/linux/cmsg_nxthdr.c (__cmsg_nxthdr): Correct
        test for cmsg struct size.
        * sysdeps/unix/sysv/linux/bits/socket.h (__cmsg_nxthdr): Likewise.
index b4c51749ef2399fe4bbc81e98c5009c0efbd68ea..0969bd3abf511c251c371418766b39c92945d5bd 100644 (file)
@@ -1,5 +1,8 @@
 2001-07-31  Ulrich Drepper  <drepper@redhat.com>
 
+       * tst-context.c (threadfct): Initialize context before calling
+       makecontext.
+
        * Examples/ex17.c: Make sure test thread is around long enough.
 
 2001-07-26  kaz Kojima  <kkojima@rr.iij4u.or.jp>
index ddc0f6f117ee8b5a11faaedb3158065a24d67adf..600a886863b6bfa56f4bed9302d5c03f6f86a503 100644 (file)
@@ -43,13 +43,11 @@ ENTRY(__getcontext)
        movl    %ecx, oESP(%eax)
        movl    %ebx, oEBX(%eax)
 
-       /* Save the FS and GS segment register.  */
+       /* Save the FS segment register.  We don't touch the GS register
+          since it is used for threads.  */
        xorl    %edx, %edx
-       xorl    %ecx, %ecx
-       movw    %gs, %dx
-       movw    %fs, %cx
-       movl    %edx, oGS(%eax)
-       movl    %ecx, oFS(%eax)
+       movw    %fs, %dx
+       movl    %edx, oFS(%eax)
 
        /* We have separate floating-point register content memory on the
           stack.  We use the __fpregs_mem block in the context.  Set the
index 985212310e045e436e7dfd8445993f1095c74899..58a122fc28bf0bee8df91bb6840233d956a3f0ed 100644 (file)
@@ -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.  */
index a8481b29247a6b86f39e59d981923ad8fda1b4e9..0c249437a582cbfee6fd70b9e05094d4dc1d01d2 100644 (file)
@@ -43,13 +43,10 @@ ENTRY(__swapcontext)
        movl    %ecx, oESP(%eax)
        movl    %ebx, oEBX(%eax)
 
-       /* Save the FS and GS segment register.  */
+       /* Save the FS segment register.  */
        xorl    %edx, %edx
-       xorl    %ecx, %ecx
-       movw    %gs, %dx
-       movw    %fs, %cx
-       movl    %edx, oGS(%eax)
-       movl    %ecx, oFS(%eax)
+       movw    %fs, %dx
+       movl    %edx, oFS(%eax)
 
        /* We have separate floating-point register content memory on the
           stack.  We use the __fpregs_mem block in the context.  Set the
@@ -81,11 +78,9 @@ ENTRY(__swapcontext)
        movl    oFPREGS(%eax), %ecx
        fldenv  (%ecx)
 
-       /* Restore the FS and GS segment registers.  */
-       movl    oGS(%eax), %edx
-       movl    oFS(%eax), %ecx
-       movw    %dx, %gs
-       movw    %cx, %fs
+       /* Restore the FS segment registers.  */
+       movl    oFS(%eax), %edx
+       movw    %dx, %fs
 
        /* Load the new stack pointer.  */
        movl    oESP(%eax), %ecx