patches mentioned in bug report comments
patches mentioned in bug report comments
Where are the patches mentioned in the bug report comments? The specific one I'm refering to is http://bugs.winehq.org/show_bug.cgi?id=15323#c12. The comment mentions that it's attached, but I can't seem to access the attachment.
patches mentioned in bug report comments
2009/4/25 jasonmh <[email protected]>
First:
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 87b9d57..ae40811 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -480,6 +480,8 @@ static void start_thread( struct startup_info *info )
InsertHeadList( &tls_links, &teb->TlsLinks );
RtlReleasePebLock();
+ sched_yield();
+
/* NOTE: Windows does not have an exception handler around the call to
* the thread attach. We do for ease of debugging */
if (unhandled_exception_filter)
Second:
diff --git a/dlls/kernel32/tests/thread.c b/dlls/kernel32/tests/thread.c
index fa57fd9..2917429 100644
--- a/dlls/kernel32/tests/thread.c
+++ b/dlls/kernel32/tests/thread.c
@@ -1197,6 +1197,35 @@ static void test_TLS(void)
cleanup_thread_sync_helpers();
}
+typedef struct {
+ DWORD tid;
+ BOOL flag;
+} timingStruct;
+
+static DWORD WINAPI threadFuncTiming(LPVOID p)
+{
+ timingStruct *tstruct = (timingStruct *)p;
+ tstruct->flag=TRUE;
+ return 0;
+}
+
+/* Check basic functionality of CreateThread and Tls* functions */
+static VOID test_CreateThread_timing(void)
+{
+ HANDLE thread;
+ DWORD exitCode;
+ timingStruct tstruct;
+
+ tstruct.flag = FALSE;
+ thread = CreateThread( NULL, 0, threadFuncTiming,
+ &tstruct, 0, &tstruct.tid );
+ ok(thread!=NULL,"Create Thread failed\n");
+ if(thread) {
+ ok(!tstruct.flag,"Thread ran before creator did\n");
+ ok(CloseHandle(thread)!=0,"CloseHandle failed\n");
+ }
+}
+
START_TEST(thread)
{
HINSTANCE lib;
@@ -1241,7 +1270,7 @@ START_TEST(thread)
}
return;
}
-
+/*
test_CreateRemoteThread();
test_CreateThread_basic();
test_CreateThread_suspended();
@@ -1258,4 +1287,6 @@ START_TEST(thread)
test_QueueUserWorkItem();
test_RegisterWaitForSingleObject();
test_TLS();
+*/
+ test_CreateThread_timing();
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... chment.htm>
Which one exactly? I can acces the last two without problems:Where are the patches mentioned in the bug report comments? The specific
one I'm refering to is http://bugs.winehq.org/show_bug.cgi?id=15323#c12.
The comment mentions that it's attached, but I can't seem to access the
attachment.
First:
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 87b9d57..ae40811 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -480,6 +480,8 @@ static void start_thread( struct startup_info *info )
InsertHeadList( &tls_links, &teb->TlsLinks );
RtlReleasePebLock();
+ sched_yield();
+
/* NOTE: Windows does not have an exception handler around the call to
* the thread attach. We do for ease of debugging */
if (unhandled_exception_filter)
Second:
diff --git a/dlls/kernel32/tests/thread.c b/dlls/kernel32/tests/thread.c
index fa57fd9..2917429 100644
--- a/dlls/kernel32/tests/thread.c
+++ b/dlls/kernel32/tests/thread.c
@@ -1197,6 +1197,35 @@ static void test_TLS(void)
cleanup_thread_sync_helpers();
}
+typedef struct {
+ DWORD tid;
+ BOOL flag;
+} timingStruct;
+
+static DWORD WINAPI threadFuncTiming(LPVOID p)
+{
+ timingStruct *tstruct = (timingStruct *)p;
+ tstruct->flag=TRUE;
+ return 0;
+}
+
+/* Check basic functionality of CreateThread and Tls* functions */
+static VOID test_CreateThread_timing(void)
+{
+ HANDLE thread;
+ DWORD exitCode;
+ timingStruct tstruct;
+
+ tstruct.flag = FALSE;
+ thread = CreateThread( NULL, 0, threadFuncTiming,
+ &tstruct, 0, &tstruct.tid );
+ ok(thread!=NULL,"Create Thread failed\n");
+ if(thread) {
+ ok(!tstruct.flag,"Thread ran before creator did\n");
+ ok(CloseHandle(thread)!=0,"CloseHandle failed\n");
+ }
+}
+
START_TEST(thread)
{
HINSTANCE lib;
@@ -1241,7 +1270,7 @@ START_TEST(thread)
}
return;
}
-
+/*
test_CreateRemoteThread();
test_CreateThread_basic();
test_CreateThread_suspended();
@@ -1258,4 +1287,6 @@ START_TEST(thread)
test_QueueUserWorkItem();
test_RegisterWaitForSingleObject();
test_TLS();
+*/
+ test_CreateThread_timing();
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... chment.htm>
patches mentioned in bug report comments
2009/4/25 jasonmh <[email protected]>
wine-1.1.20), download the patches (patches are plain text so simply save
them to files... let say patch1.patch and patch2.patch). Unpack wine source
code and copy patches to wine source folder. Now simply type(in console,
while being in wine dir):
patch -p1 <patch1.patch
patch -p1 <patch2.patch
You should get something like: "Patching file xxx; HUNK xxx succeed at xxx"
now simply recompile wine and use it (instructions on how to compile wine
depends on your distribution for Debian based, like Ubuntu):
1.sudo apt-get build-dep wine (that should get all dependencies required to
build wine)
2.sudo apt-get install checkinstall (this tool will allow you to build .deb
package of wine after compilation)
3.(in wine source dir) ./configure && make depend && make
OR if your CPU have many cores:
./configure && make depend -jX && make -jX where X is numeber of cores your
CPU has
After (hopefully, successful) compilation just type:
sudo checkinstall
and follow instructions there - it should install wine at the end - if it
won't just install it by hand:
sudo dpkg -i wine_<something>.deb
Now you are all set, just type wine appname.exe to start something ;]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... chment.htm>
You download source code of wine (wine-git or normal wine-1.xxx (for nowhow are you using that? All that stuff is gobbly gook to me.
wine-1.1.20), download the patches (patches are plain text so simply save
them to files... let say patch1.patch and patch2.patch). Unpack wine source
code and copy patches to wine source folder. Now simply type(in console,
while being in wine dir):
patch -p1 <patch1.patch
patch -p1 <patch2.patch
You should get something like: "Patching file xxx; HUNK xxx succeed at xxx"
now simply recompile wine and use it (instructions on how to compile wine
depends on your distribution for Debian based, like Ubuntu):
1.sudo apt-get build-dep wine (that should get all dependencies required to
build wine)
2.sudo apt-get install checkinstall (this tool will allow you to build .deb
package of wine after compilation)
3.(in wine source dir) ./configure && make depend && make
OR if your CPU have many cores:
./configure && make depend -jX && make -jX where X is numeber of cores your
CPU has
After (hopefully, successful) compilation just type:
sudo checkinstall
and follow instructions there - it should install wine at the end - if it
won't just install it by hand:
sudo dpkg -i wine_<something>.deb
Now you are all set, just type wine appname.exe to start something ;]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... chment.htm>