Module: wine Branch: stable Commit: fe175342eb86fdad3faa32a6a3999caecfb149b6 URL: https://source.winehq.org/git/wine.git/?a=commit;h=fe175342eb86fdad3faa32a6a...
Author: Changping Yu dead.ash@hotmail.com Date: Mon Jun 29 13:08:27 2020 +0800
kernel32: Adjust thread creation insertion order.
Signed-off-by: Changping Yu dead.ash@hotmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org (cherry picked from commit 59ce4e3eb878ca470ec0f153f567e92a3a577922) Signed-off-by: Michael Stefaniuc mstefani@winehq.org
---
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 7ec0b3aab3a..b196a4f5f0d 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, "wrong order in NtQuerySystemInformation function\n");
SetEvent(ev); @@ -303,7 +301,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(ULongToPtr(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. */ @@ -312,7 +309,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 80db41b48d2..a838bf5ddd0 100644 --- a/server/thread.c +++ b/server/thread.c @@ -265,7 +265,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 |