Module: wine
Branch: master
Commit: 59ce4e3eb878ca470ec0f153f567e92a3a577922
URL: https://source.winehq.org/git/wine.git/?a=commit;h=59ce4e3eb878ca470ec0f153…
Author: Changping Yu <dead.ash(a)hotmail.com>
Date: Mon Jun 29 13:08:27 2020 +0800
kernel32: Adjust thread creation insertion order.
Signed-off-by: Changping Yu <dead.ash(a)hotmail.com>
Signed-off-by: Alexandre Julliard <julliard(a)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 eab35e0a47..7d27f22196 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 3cf447b1a0..23c0538150 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 |