Rémi Bernon
544fd9504a
ntdll: Process system APCs while the signals are blocked.
...
This makes sure that system APC, such as APC_BREAK_PROCESS do not get
interrupted in the middle of their execution, and that the APC
completion notification is always correctly sent back to the caller.
Otherwise DbgBreakProcess sometimes did not return until
WaitForDebugEvent/ContinueDebugEvent are called, because of a race
condition between the APC servicing thread, and the newly created
exception thread.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-05 21:28:26 +01:00
Rémi Bernon
2dc99bfb30
ntdll: Handle system APCs in a separate inner loop.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-05 21:28:24 +01:00
Rémi Bernon
3ffa355d2b
ntdll: Use the status to tell user APC from system APC.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-05 21:28:21 +01:00
Rémi Bernon
6cb2336217
ntdll: Reorder code to make the select logic clearer.
...
The wait_select_reply call may return STATUS_USER_APC/STATUS_KERNEL_APC,
depending on which APC is about to be returned but the apc call will
always be APC_NONE right after the wait. It needs an additional select
request to actually return the call.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-05 21:28:18 +01:00
Rémi Bernon
676ad9b0af
server: Use STATUS_KERNEL_APC to indicate system APCs.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-05 21:28:15 +01:00
Alexandre Julliard
dd73223289
ntdll: Remove trailing \n in fatal_perror() calls.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-29 17:50:48 +01:00
Rémi Bernon
6672fc9d85
ntdll: Use custom internal zero_bits_64 parameter format.
...
The zero_bits parameter can be a pointer mask on Win64 and WoW64 and it
was incorrectly truncated to 16bits in APCs. Testing shows that only the
leading zeroes are used in the mask, so we can safely use the 64 based
number of leading zeroes everywhere instead.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 12:29:45 +02:00
Rémi Bernon
5328b9e083
ntdll: Directly call internal functions from APC handler.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 12:11:08 +02:00
Jacek Caban
7f9faf10c7
ntdll: Implement DbgUiIssueRemoteBreakin.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-05 17:42:04 +02:00
Alexandre Julliard
c911eff7b4
ntdll: Make wine_server_call() cdecl.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-18 23:51:51 +02:00
Piotr Caban
9fa65a8751
server: Fix process trace_data initialization race on Mac.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-08 10:20:02 -06:00
Zebediah Figura
0ea963a406
ntdll: Call the select request directly in RtlWaitOnAddress().
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-04 16:13:10 +01:00
Josh DuBois
7f567451b2
ntdll: Use root of c: drive as fallback cwd during startup.
...
Signed-off-by: Josh DuBois <duboisj@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-06 22:12:17 +02:00
Alexandre Julliard
70b69f3e5f
ntdll: Don't return from attach_dlls on failure.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-30 19:06:44 +01:00
Alexandre Julliard
6c61ea6a13
ntdll: Suspend a thread with its start context explicitly before attaching dlls.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-30 12:15:51 +01:00
Alexandre Julliard
afb16abc0f
ntdll: Add a platform-specific helper for starting a process.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-29 17:18:23 +01:00
Alexandre Julliard
5996398360
ntdll: Don't change packing of fd cache entries.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-02 19:12:08 +01:00
Alexandre Julliard
a20c4e11df
ntdll: Add a helper to lock the user output buffer during a server call.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-22 15:10:21 +02:00
Alexandre Julliard
0eefa76791
ntdll: Suspend the process before attaching dlls, using the process initial context.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-19 12:43:00 +02:00
Alexandre Julliard
8c103f298b
ntdll: Add support for setting a platform-specific initial context.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-19 12:10:14 +02:00
Jacek Caban
e2469b2c3d
ntdll: Remove no longer needed APC handling from APC_ASYNC_IO callbacks.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-11 19:59:06 +02:00
Jacek Caban
fbf241034c
server: Removed no longed needed APC from APC_ASYNC_IO reply.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-11 19:58:40 +02:00
Jacek Caban
05410c4aa6
ntdll: Use callback stored in async user for calling APC_ASYNC_IO.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-11 19:56:52 +02:00
Sebastian Lackner
9d0a48da0f
ntdll: Use FD_CLOEXEC instead of hardcoded values.
...
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-07 16:33:38 +01:00
Alexandre Julliard
df3b7958a7
ntdll: Check for invalid WINEARCH values.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-16 15:20:18 +01:00
Jacek Caban
3b30002aec
ntdll: Cache error information for cacheable handles with no fd.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-28 18:35:53 +02:00
Sebastian Lackner
808619b72d
server: Allow to create win32 prefix when directory already exists.
...
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-22 12:46:01 +09:00
Sebastian Lackner
23cdc7e529
server: Unconditionally close APC handle in get_apc_result call.
...
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-29 10:59:44 +09:00
Sebastian Lackner
8a33dd43f6
ntdll: Do not check if object was signaled after user APC in server_select.
...
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-23 13:21:10 +09:00
André Hentschel
f78bd7f4d9
ntdll: Enable wow64 on ARM64.
2015-05-08 14:54:47 +09:00
Sebastian Lackner
40c912b4be
ntdll: Use lockfree implementation for get_cached_fd.
2015-05-04 16:22:38 +09:00
Sebastian Lackner
bf65fef8bc
ntdll: Assert when trying to replace an exiting file descriptor in fd_cache.
2015-03-04 21:50:38 +09:00
Alexandre Julliard
0a241b0fcc
ntdll: Allow specifying the user APC argument in the system APC callback.
2015-03-03 17:02:03 +09:00
Alexandre Julliard
8843bc144d
server: Allow passing an argument for the user APC async I/O callbacks.
2015-03-03 17:02:03 +09:00
Alexandre Julliard
8d817997ce
configure: Add a check for sys/ucontext.h and include it where appropriate.
2014-07-23 19:06:58 +02:00
Frédéric Delanoy
502fc1aef9
ntdll: Use boolean type where appropriate.
2013-12-09 11:45:50 +01:00
Alexandre Julliard
1e78c99388
kernel32: Validate the architecture of newly created processes on the server side.
2013-11-22 12:32:48 +01:00
Frédéric Delanoy
416930d498
ntdll: Use BOOL type where appropriate.
2013-11-04 11:03:43 +01:00
Dmitry Timoshkov
ba372b92b5
ntdll: Make it possible to store FILE_APPEND_DATA access bit in the server fd cache.
2013-10-04 19:59:58 +02:00
Alexandre Julliard
5c0b5f4dcb
ntdll: Move the select and APC support to server.c.
2013-08-26 20:36:56 +02:00
André Hentschel
0effd926b6
server: Remove SPARC support.
2013-03-05 11:04:07 +01:00
Alexandre Julliard
606c88a348
ntdll: Use the __NR_ names for Linux system calls.
2013-01-21 21:37:02 +01:00
André Hentschel
d11e72f925
server: Add ARM64 support.
2013-01-16 12:49:20 +01:00
Maarten Lankhorst
7457f37e4a
ntdll: Set SO_PASSCRED before connecting to eliminate a race condition in obtaining server_pid.
2012-10-18 19:31:15 +02:00
Jan Beich
83bac4113c
ntdll: Fetch thread id on NetBSD.
2012-08-17 10:47:22 +02:00
Jan Beich
fa4e97f454
ntdll: Prefer a portable function to get thread id.
2012-08-17 10:47:03 +02:00
André Hentschel
4c44e151be
ntdll: Get the unix tid on DragonFly BSD.
2012-06-04 12:17:55 +02:00
Ken Thomases
35302a643a
ntdll: Don't change SIGCHLD disposition; no automatic reaping of child processes.
2011-12-01 10:10:54 +01:00
André Hentschel
6f9d1840ef
ntdll: Remove Alpha support.
2011-04-20 13:09:39 +02:00
Alexandre Julliard
29f5799996
ntdll: Don't print an error when architecture is set to win64 and the app is 64-bit.
2011-03-01 14:11:19 +01:00