Alexandre Julliard
ee99bd4bc1
ntdll: Always send a Wow context to the server for Wow64 processes.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-20 11:34:49 +02:00
Alexandre Julliard
3fb4d1f779
ntdll: Always clear the returned handle in Nt object functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-23 17:38:32 +02:00
Alexandre Julliard
bedfb31d7c
ntdll: Add a helper function to retrieve the CPU area context on the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-01 12:46:00 +02:00
Alexandre Julliard
ee65ea88ee
ntdll: Only update the data that was requested in the destination context.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-27 11:42:32 +02:00
Alexandre Julliard
8ac411ed6d
server: Support both native and wow64 register contexts.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-27 11:42:32 +02:00
Alexandre Julliard
f64d86eb0a
ntdll: Support converting server contexts from one machine to another.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-26 11:11:01 +02:00
Alexandre Julliard
0ffbec44f3
ntdll: Initialize the RealClientId field in the TEB.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-25 22:48:47 +02:00
Alexandre Julliard
6b86b41912
server: Simplify the naming of the YMM regs.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-24 21:41:21 +02:00
Alexandre Julliard
f626349c0a
server: Use separate handles for thread and context in get_thread_context.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-24 11:00:24 +02:00
Alexandre Julliard
fed7e7a78b
ntdll: Simulate a syscall return when starting a thread.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-21 18:35:20 +02:00
Alexandre Julliard
7b4ca95ab6
ntdll: Add a helper to get the Wow64 TEB.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-17 20:01:37 +02:00
Alexandre Julliard
2084fbd93d
ntdll: Store the debug info in the TEB block after the 32-bit TEB.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-15 20:42:25 +02:00
Alexandre Julliard
588d91aecf
ntdll: Store the current PEB in a global variable.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-15 20:42:25 +02:00
Alexandre Julliard
9a430dc6db
ntdll: Also pass the TEB to signal_exit_thread().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-14 18:32:24 +02:00
Alexandre Julliard
fa5759b9ef
ntdll: Simplify the platform-specific dispatcher interface.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-11 18:45:44 +02:00
Alexandre Julliard
6b277dc89d
ntdll: Always allocate extra stack space for the kernel stack.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-11 11:06:42 +02:00
Alexandre Julliard
e8753b4bc2
ntdll: Allow the dispatcher functions to return to the caller.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-11 10:56:23 +02:00
Alexandre Julliard
e1716530d9
server: Use a standard user APC also for timers.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:00 +02:00
Alexandre Julliard
118bd9fee3
ntdll: Always put the pthread stack at the top of the 64-bit stack if there's one.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:00 +02:00
Daniel Lehman
1bfa845a67
ntdll: Silence clang warning.
...
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-24 11:42:37 +02:00
Alexandre Julliard
e8a1341f5c
ntdll: Add platform-specific helpers for getting/setting the Wow64 context.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-18 17:53:30 +02:00
Alexandre Julliard
ee0b909f87
ntdll: Export RtlWow64Get/SetThreadContext() on all 64-bit platforms.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-18 17:53:30 +02:00
Alexandre Julliard
8eda3fcc68
ntdll: Pass a server context to server_select().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-18 17:53:30 +02:00
Alexandre Julliard
f04c2bd4f1
ntdll: Make the server context conversion functions generic.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-18 17:46:41 +02:00
Alexandre Julliard
5ba8f0d73b
ntdll: Store the Wow64 context at the top of the 64-bit stack.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-17 18:49:09 +02:00
Alexandre Julliard
e40eab977a
ntdll: Only check the is_wow64 flag on 32-bit platforms.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-17 18:49:09 +02:00
Alexandre Julliard
a8ff0c12f4
ntdll: Allocate a separate 64-bit stack for Wow64 threads.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-17 18:49:09 +02:00
Alexandre Julliard
711bde7cd1
ntdll: Add a helper function to set the thread id.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-17 18:49:09 +02:00
Alexandre Julliard
4dca2cc797
ntdll: Always send the native TEB pointer to the server.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-13 16:45:28 +02:00
Alexandre Julliard
6de7fa1bde
ntdll: Take the zero_bits parameter into account in NtCreateThreadEx().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-07 22:22:49 +02:00
Alexandre Julliard
6a296592aa
server: Send the zero_bits parameter for remote NtCreateThreadEx() calls.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-07 22:22:49 +02:00
Alexandre Julliard
e85dee1fb7
ntdll: Don't output thread traces to the seh channel.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-04 14:28:13 +02:00
Paul Gofman
02e3327f06
ntdll: Implement NtGetNextThread().
...
Largely based on a patch by Nikolay Sivov for NtGetNextProcess().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-29 10:48:59 +02:00
Alexandre Julliard
308bd35746
server: Store a machine ID instead of a CPU in the context structure.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-27 10:40:53 +02:00
David Torok
11ae0ade89
ntdll: Add NtCreateThread stub.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50952
Signed-off-by: David Torok <dt@zeroitlab.com>
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-15 10:34:35 +02:00
Paul Gofman
3386560057
ntdll: Remove wait timeout in get_thread_context().
...
Fixes hangs during loading or after campaign start in
Mount & Blade II: Bannerlord.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-13 17:39:13 +02:00
Paul Gofman
51f7c9d15e
ntdll: Close server socket before calling exit().
...
So if a native exit handler hangs the process eventually gets killed by server.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-31 22:16:25 +02:00
Jacek Caban
b3dfc903ef
ntdll: Use NtContinue in NtRaiseException.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 20:19:10 +01:00
Rémi Bernon
ad24187de8
ntdll: Stub ThreadEnableAlignmentFaultFixup info class.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46216
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-20 19:01:04 +01:00
Damjan Jovanovic
a563f584f5
ntdll: Implement get_thread_times() on FreeBSD.
...
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-09 20:15:11 +01:00
Paul Gofman
419abd49a1
ntdll: Support AVX registers for other thread in Nt{Get|Set}ContextThread().
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-13 22:30:05 +02:00
Alexandre Julliard
c2c330532e
ntdll: Call the process entry point through RtlUserThreadStart().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-01 16:41:03 +02:00
Alexandre Julliard
4e5811637a
ntdll: Use syscalls for the server functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 13:55:40 +02:00
Alexandre Julliard
53e0bf2f9f
ntdll: Don't expect LdrInitializeThunk() to return to the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 18:45:53 +02:00
Alexandre Julliard
7a71f98640
ntdll: Use KiUserApcDispatcher() to call user APCs.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-06 19:31:24 +02:00
Alexandre Julliard
e3b059b5ba
ntdll: Store the thread startup info in the ntdll_thread_data structure.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-24 18:26:18 +02:00
Alexandre Julliard
d41b1c28c3
ntdll: Avoid private Unix functions in RtlExitUserThread().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-22 14:22:16 +02:00
Alexandre Julliard
fdb09f4523
ntdll: Move the activation context initialization out of NtCreateThreadEx().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-13 21:22:13 +02:00
Alexandre Julliard
c6fea822a9
ntdll: Return the TEB pointer in NtCreateThreadEx().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-13 21:22:13 +02:00
Alexandre Julliard
a2e77268f2
ntdll: Silence a noisy error.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-10 07:55:28 +02:00