[Wine] patches mentioned in bug report comments

James Huk huk256 at gmail.com
Sat Apr 25 04:46:52 CDT 2009


2009/4/25 jasonmh <wineforum-user at winehq.org>

> 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.
>
>
>
>
>
>
Which one exactly? I can acces the last two without problems:
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-users/attachments/20090425/64ad0a85/attachment.htm>


More information about the wine-users mailing list