>From c9e5df1a787a957d5db9129ee989c1b6043b37b9 Mon Sep 17 00:00:00 2001 From: Changping Yu Date: Mon, 29 Jun 2020 11:26:50 +0800 Subject: [PATCH v6 2/2] kernel32: Adjust thread creation insertion order to make it the same as windows. Signed-off-by: Changping Yu --- 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 15c6309aac..2f48a123e6 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, "Return the first thread id 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, "Return the first thread id 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