Commit Graph

101 Commits

Author SHA1 Message Date
Brendan Shanks fe52b067bf ntdll: Avoid truncating pointer to 32-bits in get_cpu_area().
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-20 17:21:10 +02:00
Paul Gofman 8c931c7129 ntdll: Remove unused PTHREAD_STACK_MIN definition.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-13 11:00:38 +02:00
Brendan Shanks 1b9d48a7b0 ntdll: Don't require equal Length and MaximumLength when setting ThreadNameInformation.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-03 21:32:49 +01:00
Paul Gofman 3033e09070 ntdll: Do not force 2G stack limit for the main thread of 64 bit process.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-23 17:31:42 +01:00
Alexandre Julliard e3001b6a7c configure: Assume that sys/mman.h is available on Unix.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-09 18:43:51 +01:00
Paul Gofman c338a6ff99 ntdll: Support THREAD_CREATE_FLAGS_HIDE_FROM_DEBUGGER thread creation flag.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-06 12:20:34 +01:00
Brendan Shanks e7afddd2c1 ntdll: Rename THREAD_DESCRIPTION_INFORMATION to THREAD_NAME_INFORMATION.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-02 20:20:40 +01:00
Brendan Shanks 65dd060a67 ntdll: Rename ThreadDescription to ThreadNameInformation.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-02 20:20:40 +01:00
Alexandre Julliard 47f59be21f ntdll: Don't clear x86-64 registers when receiving a 32-bit context.
They can still be valid if running in Wow64 mode.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-01 18:13:53 +01:00
Zebediah Figura 518a175cba ntdll: Remove the no longer used "mutex" argument to server_select().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-01 09:59:37 +01:00
Paul Gofman 6747ecdefd ntdll: Fix context arch flag cleanup for AMD64 in context_from_server().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-25 21:24:59 +01:00
Alexandre Julliard 832724282b ntdll: Avoid including wine/port.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-20 16:16:07 +02:00
Jacek Caban 2ec2e136bf ntdll: Allow Unix libraries to use exception macros.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-07 18:03:11 +02:00
Alexandre Julliard 97479d3d32 ntdll: Move some exception definitions to winternl.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-07 13:52:42 +02:00
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