[PATCH v6 2/2] kernel32: Adjust thread creation insertion order to make it the same as windows.

Changping Yu dead.ash at hotmail.com
Mon Jun 29 00:12:21 CDT 2020


>From 0f61feeb51a1850ea05563e6236a46e6eb53ccd3 Mon Sep 17 00:00:00 2001
From: Changping Yu <dead.ash at hotmail.com>
Date: Mon, 29 Jun 2020 13:08:27 +0800
Subject: [PATCH v6 2/2] kernel32: Adjust thread creation insertion order to
 make it the same as windows.

Signed-off-by: Changping Yu <dead.ash at hotmail.com>
---
 dlls/kernel32/tests/toolhelp.c | 4 ----
 server/thread.c                | 2 +-
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/dlls/kernel32/tests/toolhelp.c b/dlls/kernel32/tests/toolhelp.c
index 0bb6963fa8..bbde15fa6e 100644
--- a/dlls/kernel32/tests/toolhelp.c
+++ b/dlls/kernel32/tests/toolhelp.c
@@ -227,7 +227,6 @@ static DWORD WINAPI get_id_thread(void* curr_pid)
         /* Reset data */
         thread_traversed[i] = 0;
     }
-    todo_wine
     ok(found == FALSE, "The thread order is not strictly consistent\n");
 
     /* Determine the order by NtQuerySystemInformation function */
@@ -282,7 +281,6 @@ static DWORD WINAPI get_id_thread(void* curr_pid)
             break;
         }
     }
-    todo_wine
     ok(found == FALSE, "Judge the failure of traversing thread by NtQuerySystemInformation function\n");
 
     SetEvent(ev);
@@ -302,7 +300,6 @@ static void test_main_thread(DWORD curr_pid, DWORD main_tid)
 
     /* Check that the main thread id is first one in this thread. */
     tid = get_id_thread((void *)curr_pid);
-    todo_wine
     ok(tid == main_tid, "The first thread id returned is not the main thread id\n");
 
     /* Check that the main thread id is first one in other thread. */
@@ -311,7 +308,6 @@ static void test_main_thread(DWORD curr_pid, DWORD main_tid)
     ok(error == WAIT_OBJECT_0, "Thread did not complete within timelimit\n");
 
     ok(GetExitCodeThread(thread, &tid), "Could not retrieve exit code\n");
-    todo_wine
     ok(tid == main_tid, "The first thread id returned is not the main thread id\n");
 }
 
diff --git a/server/thread.c b/server/thread.c
index e2bfa50c7b..f8c8443ba0 100644
--- a/server/thread.c
+++ b/server/thread.c
@@ -329,7 +329,7 @@ struct thread *create_thread( int fd, struct process *process, const struct secu
     thread->affinity = process->affinity;
     if (!current) current = thread;
 
-    list_add_head( &thread_list, &thread->entry );
+    list_add_tail( &thread_list, &thread->entry );
 
     if (sd && !set_sd_defaults_from_token( &thread->obj, sd,
                                            OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION |
-- 
2.27.0.windows.1



More information about the wine-devel mailing list