wine/dlls/ntdll thread.c

Alexandre Julliard julliard at wine.codeweavers.com
Thu Nov 3 03:54:47 CST 2005


ChangeSet ID:	21071
CVSROOT:	/opt/cvs-commit
Module name:	wine
Changes by:	julliard at winehq.org	2005/11/03 03:54:47

Modified files:
	dlls/ntdll     : thread.c 

Log message:
	Vitaliy Margolen <wine-patch at kievinfo.com>
	Get rid of CPU id when copying context

Patch: http://cvs.winehq.org/patch.py?id=21071

Old revision  New revision  Changes     Path
 1.43          1.44          +4 -0       wine/dlls/ntdll/thread.c

Index: wine/dlls/ntdll/thread.c
diff -u -p wine/dlls/ntdll/thread.c:1.43 wine/dlls/ntdll/thread.c:1.44
--- wine/dlls/ntdll/thread.c:1.43	3 Nov 2005  9:54:47 -0000
+++ wine/dlls/ntdll/thread.c	3 Nov 2005  9:54:47 -0000
@@ -528,6 +528,7 @@ NTSTATUS WINAPI NtSetContextThread( HAND
 static inline void copy_context( CONTEXT *to, const CONTEXT *from, DWORD flags )
 {
 #ifdef __i386__
+    flags &= ~CONTEXT_i386;  /* get rid of CPU id */
     if (flags & CONTEXT_INTEGER)
     {
         to->Eax = from->Eax;
@@ -567,6 +568,7 @@ static inline void copy_context( CONTEXT
         to->FloatSave = from->FloatSave;
     }
 #elif defined(__x86_64__)
+    flags &= ~CONTEXT_AMD64;  /* get rid of CPU id */
     if (flags & CONTEXT_CONTROL)
     {
         to->Rbp    = from->Rbp;
@@ -615,6 +617,7 @@ static inline void copy_context( CONTEXT
         to->Dr7 = from->Dr7;
     }
 #elif defined(__sparc__)
+    flags &= ~CONTEXT_SPARC;  /* get rid of CPU id */
     if (flags & CONTEXT_CONTROL)
     {
         to->psr = from->psr;
@@ -664,6 +667,7 @@ static inline void copy_context( CONTEXT
         /* FIXME */
     }
 #elif defined(__powerpc__)
+    /* Has no CPU id */
     if (flags & CONTEXT_CONTROL)
     {
         to->Msr = from->Msr;



More information about the wine-cvs mailing list