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.
This commit is contained in:
parent
ad71126b24
commit
e14b144780
@ -1,5 +1,10 @@
|
|||||||
2001-07-31 Ulrich Drepper <drepper@redhat.com>
|
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
|
* sysdeps/unix/sysv/linux/cmsg_nxthdr.c (__cmsg_nxthdr): Correct
|
||||||
test for cmsg struct size.
|
test for cmsg struct size.
|
||||||
* sysdeps/unix/sysv/linux/bits/socket.h (__cmsg_nxthdr): Likewise.
|
* sysdeps/unix/sysv/linux/bits/socket.h (__cmsg_nxthdr): Likewise.
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
2001-07-31 Ulrich Drepper <drepper@redhat.com>
|
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.
|
* Examples/ex17.c: Make sure test thread is around long enough.
|
||||||
|
|
||||||
2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
|
2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
|
||||||
|
@ -43,13 +43,11 @@ ENTRY(__getcontext)
|
|||||||
movl %ecx, oESP(%eax)
|
movl %ecx, oESP(%eax)
|
||||||
movl %ebx, oEBX(%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 %edx, %edx
|
||||||
xorl %ecx, %ecx
|
movw %fs, %dx
|
||||||
movw %gs, %dx
|
movl %edx, oFS(%eax)
|
||||||
movw %fs, %cx
|
|
||||||
movl %edx, oGS(%eax)
|
|
||||||
movl %ecx, oFS(%eax)
|
|
||||||
|
|
||||||
/* We have separate floating-point register content memory on the
|
/* We have separate floating-point register content memory on the
|
||||||
stack. We use the __fpregs_mem block in the context. Set the
|
stack. We use the __fpregs_mem block in the context. Set the
|
||||||
|
@ -48,10 +48,9 @@ ENTRY(__setcontext)
|
|||||||
movl oFPREGS(%eax), %ecx
|
movl oFPREGS(%eax), %ecx
|
||||||
fldenv (%ecx)
|
fldenv (%ecx)
|
||||||
|
|
||||||
/* Restore the FS and GS segment registers. */
|
/* Restore the FS segment register. We don't touch the GS register
|
||||||
movl oGS(%eax), %edx
|
since it is used for threads. */
|
||||||
movl oFS(%eax), %ecx
|
movl oFS(%eax), %ecx
|
||||||
movw %dx, %gs
|
|
||||||
movw %cx, %fs
|
movw %cx, %fs
|
||||||
|
|
||||||
/* Load the new stack pointer. */
|
/* Load the new stack pointer. */
|
||||||
|
@ -43,13 +43,10 @@ ENTRY(__swapcontext)
|
|||||||
movl %ecx, oESP(%eax)
|
movl %ecx, oESP(%eax)
|
||||||
movl %ebx, oEBX(%eax)
|
movl %ebx, oEBX(%eax)
|
||||||
|
|
||||||
/* Save the FS and GS segment register. */
|
/* Save the FS segment register. */
|
||||||
xorl %edx, %edx
|
xorl %edx, %edx
|
||||||
xorl %ecx, %ecx
|
movw %fs, %dx
|
||||||
movw %gs, %dx
|
movl %edx, oFS(%eax)
|
||||||
movw %fs, %cx
|
|
||||||
movl %edx, oGS(%eax)
|
|
||||||
movl %ecx, oFS(%eax)
|
|
||||||
|
|
||||||
/* We have separate floating-point register content memory on the
|
/* We have separate floating-point register content memory on the
|
||||||
stack. We use the __fpregs_mem block in the context. Set the
|
stack. We use the __fpregs_mem block in the context. Set the
|
||||||
@ -81,11 +78,9 @@ ENTRY(__swapcontext)
|
|||||||
movl oFPREGS(%eax), %ecx
|
movl oFPREGS(%eax), %ecx
|
||||||
fldenv (%ecx)
|
fldenv (%ecx)
|
||||||
|
|
||||||
/* Restore the FS and GS segment registers. */
|
/* Restore the FS segment registers. */
|
||||||
movl oGS(%eax), %edx
|
movl oFS(%eax), %edx
|
||||||
movl oFS(%eax), %ecx
|
movw %dx, %fs
|
||||||
movw %dx, %gs
|
|
||||||
movw %cx, %fs
|
|
||||||
|
|
||||||
/* Load the new stack pointer. */
|
/* Load the new stack pointer. */
|
||||||
movl oESP(%eax), %ecx
|
movl oESP(%eax), %ecx
|
||||||
|
Loading…
x
Reference in New Issue
Block a user