Fix a couple of errors.

This commit is contained in:
Zebediah Figura
2020-05-04 22:44:11 -05:00
parent 76ba9d2387
commit 3e39e3132b
2 changed files with 28 additions and 19 deletions

View File

@ -1,4 +1,4 @@
From 9b9a9666a78c0cf0a8dda6f01103849a9e7422c3 Mon Sep 17 00:00:00 2001
From 1a7a4c790294dc0eddd3202853c17967d6bb8e1a Mon Sep 17 00:00:00 2001
From: Andrew Wesie <awesie@gmail.com>
Date: Fri, 27 Jul 2018 01:22:59 -0500
Subject: [PATCH] ntdll: Refactor RtlCreateUserThread into NtCreateThreadEx.
@ -12,7 +12,7 @@ reported version), and expects it to be called whenever a thread is created.
3 files changed, 187 insertions(+), 36 deletions(-)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 82b1d58aff71..af8a14b50a67 100644
index cb6a8ec8c4..16ec96bc56 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -182,7 +182,7 @@
@ -25,10 +25,10 @@ index 82b1d58aff71..af8a14b50a67 100644
@ stdcall NtCreateTimer(ptr long ptr long)
@ stub NtCreateToken
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 484e60fc21e9..605221ee144b 100644
index ceadcff1b2..2c4a9c4949 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -409,34 +409,18 @@ static void start_thread( struct startup_info *info )
@@ -413,34 +413,18 @@ static void start_thread( struct startup_info *info )
/***********************************************************************
* NtCreateThreadEx (NTDLL.@)
*/
@ -68,7 +68,7 @@ index 484e60fc21e9..605221ee144b 100644
HANDLE handle = 0, actctx = 0;
TEB *teb = NULL;
DWORD tid = 0;
@@ -447,6 +431,33 @@ NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, SECURITY_DESCRIPTOR *descr,
@@ -451,6 +435,33 @@ NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, SECURITY_DESCRIPTOR *descr,
struct object_attributes *objattr = NULL;
INITIAL_TEB stack;
@ -102,7 +102,7 @@ index 484e60fc21e9..605221ee144b 100644
if (process != NtCurrentProcess())
{
apc_call_t call;
@@ -472,12 +483,7 @@ NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, SECURITY_DESCRIPTOR *descr,
@@ -476,12 +487,7 @@ NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, SECURITY_DESCRIPTOR *descr,
return result.create_thread.status;
}
@ -116,7 +116,7 @@ index 484e60fc21e9..605221ee144b 100644
if (server_pipe( request_pipe ) == -1)
{
@@ -489,7 +495,7 @@ NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, SECURITY_DESCRIPTOR *descr,
@@ -493,7 +499,7 @@ NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, SECURITY_DESCRIPTOR *descr,
SERVER_START_REQ( new_thread )
{
req->process = wine_server_obj_handle( process );
@ -125,7 +125,7 @@ index 484e60fc21e9..605221ee144b 100644
req->suspend = suspended;
req->request_fd = request_pipe[0];
wine_server_add_data( req, objattr, len );
@@ -548,20 +554,20 @@ NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, SECURITY_DESCRIPTOR *descr,
@@ -552,20 +558,20 @@ NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, SECURITY_DESCRIPTOR *descr,
thread_data->wait_fd[1] = -1;
thread_data->start_stack = (char *)teb->Tib.StackBase;
@ -149,11 +149,11 @@ index 484e60fc21e9..605221ee144b 100644
goto error;
}
- pthread_attr_destroy( &attr );
+ pthread_attr_destroy( &nb_threads );
+ pthread_attr_destroy( &pthread_attr );
pthread_sigmask( SIG_SETMASK, &sigset, NULL );
if (id) id->UniqueThread = ULongToHandle(tid);
@@ -578,6 +584,124 @@ error:
@@ -582,6 +588,124 @@ error:
return status;
}
@ -279,10 +279,10 @@ index 484e60fc21e9..605221ee144b 100644
/******************************************************************************
* RtlGetNtGlobalFlags (NTDLL.@)
diff --git a/include/winternl.h b/include/winternl.h
index 865e39d16e06..1d2d49414448 100644
index 733c8a33f6..5c3f7a05ff 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -2251,6 +2251,33 @@ typedef struct _NLSTABLEINFO
@@ -2250,6 +2250,33 @@ typedef struct _NLSTABLEINFO
USHORT *LowerCaseTable;
} NLSTABLEINFO, *PNLSTABLEINFO;