Commit Graph

294 Commits

Author SHA1 Message Date
Alexandre Julliard ca20bddefc ntdll: Remove support for relay debugging of register functions.
The only remaining ones in krnl386 have been removed.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-26 10:41:27 +02:00
Alexandre Julliard b87c66dd65 ntdll: Move the plaform-independent thread data to the GdiTebBatch TEB field.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-19 19:13:29 +02:00
Alexandre Julliard ce46de5a94 ntdll: Move NtGetContextThread implementation to the platform-specific files.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-18 20:43:32 +02:00
Alexandre Julliard 675e8218f0 ntdll: Move NtSetContextThread implementation to the platform-specific files.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-18 20:43:32 +02:00
Alexandre Julliard fe0924625f ntdll: Add a helper to validate attributes in open calls, and use a common pattern in all calls.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-29 21:25:11 +09:00
Alexandre Julliard 3198fb0c1c ntdll: Add a helper function to allocate the full object_attributes structure.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-16 00:05:57 +09:00
Qian Hong 604c4dba80 ntdll: Correctly document the offset of ntdll_thread_data.
This is a follow up of 16ddc62405.
2015-04-21 14:30:45 +09:00
Sebastian Lackner 6bec132c7a ntdll: Try to handle write-watches while we're on the signal stack. 2015-02-27 14:59:08 +09:00
Hans Leidekker faf70e2fbd ntdll: Fix calculation of process and thread affinity masks on systems with a large number of processors. 2015-01-21 15:31:16 +01:00
Erich E. Hoover ca51e113e4 ntdll: Unify retrieving the attributes of a file. 2014-12-17 19:42:23 +01:00
Sebastian Lackner 34b2d920b4 ntdll: Improve check_atl_thunk to prevent passing exceptions to the usermode application. 2014-10-15 11:52:06 +09:00
Alexandre Julliard e54503f708 ntdll: Allocate TLS data in all running threads on module load. 2013-12-23 18:39:58 +01:00
Frédéric Delanoy 502fc1aef9 ntdll: Use boolean type where appropriate. 2013-12-09 11:45:50 +01:00
Alexandre Julliard f21961cc14 ntdll: Add a configure check for the tcdrain function.
Also remove the tcgetattr check that is no longer used.
2013-09-05 13:18:21 +02:00
Alexandre Julliard fcb3e60332 ntdll: Implement the RunOnce functions. 2013-08-28 22:27:31 +02:00
Alexandre Julliard 5c0b5f4dcb ntdll: Move the select and APC support to server.c. 2013-08-26 20:36:56 +02:00
Alexandre Julliard a56ffb6326 ntdll: Rename NTDLL_wait_for_multiple_objects to server_select since it's more generic now. 2013-08-26 20:36:22 +02:00
Alexandre Julliard 947e337480 server: Make signal and wait a separate select operation. 2013-08-26 20:34:28 +02:00
Alexandre Julliard cbdc0ec72d ntdll: Pass a select operation structure to NTDLL_wait_for_multiple_objects. 2013-08-26 20:32:19 +02:00
Nikolay Sivov 5ce01b3597 ntdll: Implement compatible FindActCtxSectionString() for window class section. 2013-08-02 14:36:12 +02:00
Nikolay Sivov 9e5097187e ntdll: Implement RtlHashUnicodeString(). 2013-07-24 14:35:09 -05:00
Alexandre Julliard cd03a51e7d ntdll: Set the address space limit before running application code. 2013-04-04 13:28:43 +02:00
Alexandre Julliard 99d89b347f ntdll: Add a helper function to check that a fault address lies in a known virtual memory view. 2013-02-12 19:56:19 +01:00
Alexandre Julliard 90e90e3b6a ntdll: Make the page_size variable global. 2013-01-08 16:35:30 +01:00
Alexandre Julliard 62b7069fa9 ntdll: Unwind the stack before calling exit/abort_thread on i386 the same way we do on x86_64. 2011-10-19 16:38:52 +02:00
Alexandre Julliard f4024eaa49 ntdll: Fetch the windows directory from the shared user data. 2011-06-16 12:29:21 +02:00
Marcus Meissner 0f0692716b ntdll: Mark FILE_umask with hidden visibility. 2011-05-27 12:21:39 +02:00
Marcus Meissner 2802d3344d ntdll: Mark internal functions as hidden. 2011-04-25 13:01:52 +02:00
Alexandre Julliard b41cc4865c ntdll: Get rid of support for register entry points on x86_64. 2011-01-27 14:12:41 +01:00
Hans Leidekker 71beac3219 ntdll: Don't call NtClose directly in delete_view. 2010-12-02 12:47:42 +01:00
Alexandre Julliard 177a7e5683 Revert "ntdll: Fix possible deadlock in vectored exception handling."
This reverts commit eb0e82a755.
It's causing different deadlocks, notably when a thread tries to
remove a handler inside a handler.
2010-11-10 19:17:41 +01:00
Krzysztof Nowicki eb0e82a755 ntdll: Fix possible deadlock in vectored exception handling. 2010-10-12 12:30:48 +02:00
Marcus Meissner 2ca5513a62 ntdll: Set correct protection flags on sections in builtin DLLs. 2010-08-24 17:22:32 +02:00
Alexandre Julliard 9055e9e3dd ntdll: Set the heap debug flags based on the GlobalFlag value. 2010-01-22 12:33:03 +01:00
Alexandre Julliard 102dd9e92f winebuild: Rename __wine_call_from_32_regs for consistency with 64-bit. 2010-01-16 15:41:48 +01:00
Alexandre Julliard 574eace36e ntdll: Return a correct name also for file objects in NtQueryObject. 2010-01-08 13:16:57 +01:00
Alexandre Julliard 9c789f4025 ntdll: Add support for the FILE_OPEN_BY_FILE_ID flag in NtCreateFile. 2009-12-03 10:10:06 +01:00
Alexandre Julliard d97149b708 ntdll: Add support for converting file names to Unix when a root directory is specified. 2009-12-01 17:24:26 +01:00
Alexandre Julliard 16ddc62405 ntdll: Merge the thread data and thread regs structure, and make sure i386 regs are not available on other platforms. 2009-11-19 12:27:09 +01:00
Alexandre Julliard d4f1fffacc ntdll: Moved the TEB allocation routines to the platform-specific files. 2009-11-19 12:25:52 +01:00
Alexandre Julliard da1df74147 ntdll: Use the common fill_stat_info function from the directory code too. 2009-11-18 21:58:23 +01:00
Alexandre Julliard 4e77222820 ntdll: Move the window and system dir variables to directory.c 2009-10-22 19:55:06 +02:00
Eric Pouech 57f714f3eb ntdll: Reuse kernel32's cpu info to implement NtQuerySystemInformation(SystemProcessInformation). 2009-09-22 16:51:16 +02:00
Alexandre Julliard 690cf4a6c8 ntdll: Use a more drastic (and simpler) method for unwinding the stack on thread exit. 2009-08-29 16:48:30 +02:00
Alexandre Julliard 8101a2fa1e ntdll: Move the abort_thread() function to the CPU-specific files to allow redefining it. 2009-08-28 11:54:50 +02:00
Alexandre Julliard b46cf438f8 ntdll: Add a ret to DEFINE_REGS_ENTRYPOINT to make copy protections happy. 2009-08-12 17:04:20 +02:00
Alexandre Julliard 12c90b04dc ntdll: Support querying the Wow64 state of other processes. 2009-07-07 11:38:19 +02:00
Alexandre Julliard 747d58d211 ntdll: Add management of the Wow64 filesystem redirection flag. 2009-07-06 15:08:39 +02:00
Alexandre Julliard 6f68b774d7 ntdll: Avoid the close-on-exec race with pipe() on kernels that support pipe2(). 2009-07-01 12:13:34 +02:00
Alexandre Julliard 09712593c8 ntdll: Release some address space after the process initialization is done. 2009-06-25 14:33:34 +02:00
Alexandre Julliard 0610549529 ntdll: Move all thread exit processing to exit_thread(), and make RtlExitUserThread() CPU-specific. 2009-06-18 17:06:21 +02:00
Alexandre Julliard f124c7cc38 ntdll: Simplify the thread startup routine and make it CPU-specific. 2009-06-18 17:01:44 +02:00
Francois Gouget cb9a95f560 ntdll: virtual_free_system_view() is not used anymore so remove it. 2009-05-13 12:45:37 +02:00
Alexandre Julliard c5a57e7d13 ntdll: Move NtRaiseException and RtlUnwind implementations to the CPU-specific files. 2009-04-30 13:23:15 +02:00
Alexandre Julliard 48199d7074 ntdll: Add a raise_status function and avoid exporting __regs_RtlRaiseException. 2009-04-10 13:09:06 +02:00
Alexandre Julliard 2a2fe959af ntdll: Remove pthread_data from the ntdll_thread_data structure. Document the offsets for 64-bit. 2009-04-09 14:41:12 +02:00
Alexandre Julliard 5316dd011f server: Define a generic context structure instead of using the platform-specific version. 2009-04-08 19:59:23 +02:00
Alexandre Julliard 7e47d19d9a ntdll: Set the WOW64 flag according to the server supported CPUs. 2009-04-03 17:05:29 +02:00
Alexandre Julliard 17c09347c0 loader: Don't bother checking for pthread.h existence, we require it anyway. 2009-03-30 15:05:07 +02:00
Alexandre Julliard c456721435 ntdll: Get rid of the no longer used pthread emulation. 2009-03-26 13:20:04 +01:00
Alexandre Julliard 75be87dd75 ntdll: Move the copy_context function into the respective CPU-specific files. 2009-03-13 11:31:25 +01:00
Alexandre Julliard 1056771b91 ntdll: Allocate the stack for all threads, don't rely on pthread to do it for us. 2009-02-23 14:24:59 +01:00
Alexandre Julliard 67e45d66d3 ntdll: Don't free the thread stack and TEB while exiting, do it from the next thread. 2009-02-23 14:24:03 +01:00
Alexandre Julliard cc933f586a ntdll: Moved exit_thread and abort_thread functions to thread.c. 2009-02-20 18:07:41 +01:00
Alexandre Julliard 66255772fc ntdll: Move the CPU-specific handling of current TEB to the respective signal files. 2009-02-18 13:04:50 +01:00
Alexandre Julliard 5adfec2883 ntdll: Determine the Unix tid for the server directly in ntdll. 2009-02-18 12:30:01 +01:00
Alexandre Julliard 912d98c2ae ntdll: Improve debugging helper for object attributes structure. 2009-02-16 11:46:44 +01:00
Alexandre Julliard f8313855e4 ntdll: Convert the DbgPrint* functions to use MS ABI varargs. 2009-01-28 19:38:19 +01:00
Alexandre Julliard 63bff0937f ntdll: Check buffer for access in NtReadFile before performing I/O.
This also triggers page faults needed for write watches.
2009-01-15 12:05:26 +01:00
Alexandre Julliard 39d4f9e272 ntdll: Check buffer for access in NtWriteFile before performing I/O.
This also triggers page faults needed for DIB section access.
2009-01-15 12:04:24 +01:00
Alexandre Julliard 14c452fe78 ntdll: Replaced get_cpu_context by RtlCaptureContext. Implemented it for x86_64. 2009-01-06 17:50:34 +01:00
Alexandre Julliard 465ddc51dc winebuild: Implement register entry points for x86_64. 2009-01-06 17:01:44 +01:00
Alexandre Julliard e31188d9da winebuild: Improve the calling sequence for register functions.
Pass parameters on the stack instead of retrieving them from the code
stream; this ensures that the code contains only valid instructions.
2009-01-06 12:51:18 +01:00
Alexandre Julliard 4986f42b9f ntdll: Change the DEFINE_REGS_ENTRYPOINT macro to use a number of args instead of a size.
Also assume that all register functions are stdcall.
2009-01-06 12:49:18 +01:00
Alexandre Julliard 3ece9e9002 include: Move the DEFINE_REGS_ENTRYPOINT macros to the dlls that use it. 2008-12-27 19:47:46 +01:00
Alexandre Julliard f6fa72d770 server: Make async I/O transfer sizes always 32-bit. 2008-12-15 13:30:25 +01:00
Alexandre Julliard d1b3d484f7 server: Add functions for conversions between server object handles and pointer-style handles. 2008-12-08 16:05:17 +01:00
Alexandre Julliard 81b9ca5dbd ntdll: Pass the error code to VIRTUAL_HandleFault, and allow it to ignore the exception.
Also rename it to virtual_handle_fault for consistency.
2008-11-25 12:02:16 +01:00
Alexandre Julliard a0c4bfef9d ntdll: Add private function to manage system virtual views instead of abusing NtAllocateVirtualMemory. 2008-11-14 17:40:54 +01:00
Alexandre Julliard 3d6313c9ce ntdll: Return more correct information for SystemBasicInformation and GetSystemInfo. 2008-11-03 13:34:13 +01:00
Alexandre Julliard 5002bd21d1 kernel32: Moved the pthread emulation support to ntdll. 2008-10-30 15:39:50 +01:00
Alexandre Julliard 531ff0be26 ntdll: Split the signal setup into process-wide and thread-specific routines. 2008-07-03 20:18:23 +02:00
Alexandre Julliard 58d076b419 ntdll: Force execute permission again on the stack after clearing it. 2008-06-26 21:10:57 +02:00
Alexandre Julliard 061bfac076 ntdll: Add support for handling page faults caused by guard pages on the thread stack. 2008-04-01 17:37:24 +02:00
Alexandre Julliard 600694546f ntdll: Moved stack allocation for thread and process to a common routine in virtual.c. 2008-04-01 14:11:44 +02:00
Alexandre Julliard 78fba54ab7 ntdll: Store the unhandled exception filter at startup to avoid race conditions. 2008-02-12 22:39:19 +01:00
Andrey Turkin 793453f768 ntdll: Make async i/o functions generate completion messages. 2007-11-15 14:23:37 +01:00
Rob Shearman 23df453d38 server: Make create_mapping use struct object_attributes and set the security descriptor of file mapping objects. 2007-10-26 12:45:29 +02:00
Gerald Pfeifer 68ddc722ee ntdll: #include <sys/types.h> to get dev_t. 2007-10-22 12:37:25 +02:00
Alexandre Julliard 7fd1ad5ffa ntdll: Cache the DOS drives stat info for up to one second. 2007-10-18 15:16:07 +02:00
Alexandre Julliard 270f725526 ntdll: Create the process activation context at initialization time. 2007-07-25 16:48:40 +02:00
Jacek Caban 125e710ff1 ntdll: Store the windows directory too. 2007-07-19 18:22:43 +02:00
Alexandre Julliard 44c9758d05 ntdll: Move private data to make room in the TEB for the activation context data. 2007-07-19 16:56:10 +02:00
Dmitry Timoshkov e142779b09 ntdll: Fix compilation warnings in 64-bit mode. 2007-05-23 13:10:20 +02:00
Alexandre Julliard 5aa70b3d80 ntdll: Setup the shared user data structure at 0x7ffe0000. 2007-05-18 18:09:03 +02:00
Alexandre Julliard aaf477f292 server: Change the timeout handling to use NT-style 64-bit timeouts everywhere. 2007-04-17 20:08:59 +02:00
Alexandre Julliard d85121f199 ntdll: Store the file access and options in the fd cache, and get rid of the dynamic flags.
This avoids server round-trips for all file I/O.
2007-04-10 22:32:46 +02:00
Alexandre Julliard 9d09e699d6 ntdll: Get rid of the no longer used is_current_process function. 2007-01-18 15:18:12 +01:00
Alexandre Julliard 8891d6de48 ntdll: Block async signals during process init and thread creation. 2007-01-18 12:23:04 +01:00
Alexandre Julliard c388c58b9f ntdll: Make the server signal mask global. 2007-01-18 12:20:56 +01:00
Alexandre Julliard 6ca1d1b081 server: Support queuing some APCs to a process instead of a thread. 2007-01-15 22:26:32 +01:00
Alexandre Julliard 146fb0de02 ntdll: Make the virtual.c critical section uninterruptible by signals.
Based on a patch by Thomas Kho.
2007-01-12 20:15:52 +01:00
Alexandre Julliard 5bd513640b ntdll: Moved the check for removable file in load_dll to the server. 2007-01-12 14:42:43 +01:00
Alexandre Julliard 822be6c90f ntdll: Force exec permissions on all mmaps unless the app is marked NX-compatible. 2006-12-05 15:42:29 +01:00
Alexandre Julliard 83ce958793 ntdll: Store the fd type in the cache and return it in server_get_unix_fd. 2006-11-20 14:15:06 +01:00
Alexandre Julliard 511e0bb671 ntdll: FILE_GetDeviceInfo no longer needs to be public. 2006-11-03 15:20:21 +01:00
Alexandre Julliard 9ddb9294da ntdll: Added a server_get_unix_fd function that avoids doing a dup() of the fd when not required. 2006-11-03 11:38:44 +01:00
Alexandre Julliard 28418cc919 ntdll: Maintain a file descriptor cache on the client side. 2006-11-02 20:48:19 +01:00
Alexandre Julliard c627601c3b server: Convert the server start time to the abs_time_t type. 2006-07-26 14:50:55 +02:00
Alexandre Julliard 3ca608b1b3 ntdll: Renamed the NTDLL_get/from_server_timeout functions since they don't deal only with timeouts. 2006-07-26 14:49:13 +02:00
Alexandre Julliard 6c9ade0529 ntdll: Allocate the PEB with NtAllocateVirtualMemory too. 2006-07-24 15:19:32 +02:00
Alexandre Julliard 0c453bc7c6 ntdll: Use NtAllocateVirtualMemory to allocate all TEBs except the first one. 2006-07-21 20:20:30 +02:00
Jonathan Ernst 360a3f9142 Update the address of the Free Software Foundation. 2006-05-23 14:11:13 +02:00
Alexandre Julliard d2ad6f8355 ntdll: Get registers on the client side for NtGetContextThread on the current thread. 2006-04-20 15:40:28 +02:00
Robert Shearman ea6f3a4cc0 ntdll: Move the call to MODULE_DllThreadAttach from the kernel32
thread creation function to the NTDLL one.
2006-03-14 17:50:28 +01:00
Alexandre Julliard 4107751dd3 ntdll: Simplify loadorder code by using an enum instead of an array
to represent load order values.
Added a special value for default load order so that we can handle it
differently later on.
2006-02-22 16:30:05 +01:00
Alexandre Julliard 477b3bf566 kernel: Moved the get_startup_info call to ntdll. 2006-02-22 09:57:19 +01:00
Hans Leidekker 0844b702b4 ntdll: Add implementation of tape IOCTLs. 2006-01-26 13:23:08 +01:00
Alexandre Julliard 4ce433d826 ntdll: Move the %gs register to the ntdll_thread_regs structure. 2006-01-20 16:54:11 +01:00
Alexandre Julliard a19e3eeb20 ntdll: Move the TEB register to the ntdll_thread_regs structure. 2006-01-20 16:18:06 +01:00
Alexandre Julliard 2878d99216 ntdll: Add debug registers to the context of all exceptions.
Maintain a local cache of the debug registers to avoid server calls
where possible.
2006-01-13 13:58:14 +01:00
Eric Pouech 2cdace2760 ntdll: Created infrastructure to support IOCTL for serial devices.
- created infrastructure in ntdll to support IOCTL for serial devices
- implemented IOCTLs in ntdll for serial break support
- implemented the kernel32 equivalent on top of those IOCTLs
2006-01-12 13:32:51 +01:00
Alexandre Julliard 2654be08d5 ntdll: Handle NtSetContextThread on the client side (as far as
possible) when setting the context of the current thread.
2006-01-11 20:20:32 +01:00
Alexandre Julliard 5dc6d95952 ntdll: New implementation of relay thunks.
New implementation of relay thunks that doesn't require modifying code
on the fly, so that the thunks can be put in the text section.
Some performance improvements.
2005-12-18 10:45:01 +01:00
Ge van Geldorp 1a1583a364 Match PSDK STATUS_* definitions. 2005-11-28 17:32:54 +01:00
Alexandre Julliard 73c72390f8 Fixed Get/SetThreadContext to work properly on suspended threads.
Added a test case.
2005-11-02 20:54:12 +00:00
Alexandre Julliard a2fb7c1644 Added an implementation of the FSCTL_DISMOUNT_VOLUME ioctl that
attempts to unmount the Unix device.
2005-10-28 16:45:24 +00:00
Alexandre Julliard fb9cead92b Support arbitrary sizes for the thread signal stack, and set the
default size from the MINSIGSTKSZ constant.
2005-09-14 10:36:58 +00:00
Alexandre Julliard bc22e2f03d Moved the FileFsDeviceInformation query to a separate function. 2005-08-24 18:27:27 +00:00
Alexandre Julliard 5617b716e7 Added a wine_unix_to_nt_file_name function to do proper pathname
conversions instead of relying on GetFullPathName hacks.
2005-08-11 10:41:26 +00:00
Alexandre Julliard 915aebb852 Moved the version initialization to ntdll.
Properly set the version fields in the PEB.
Removed some no longer used structures.
2005-08-10 13:12:27 +00:00
Alexandre Julliard 9f32a5c865 Added a VIRTUAL_alloc_teb function to allocate TEBs while making sure
they don't end up above the address space limit.
2005-08-09 10:43:47 +00:00
Alexandre Julliard 4de75b5a6f Use the new RtlExitUserThread function instead of exporting
wine_server_exit_thread.
2005-08-02 09:55:40 +00:00
Dmitry Timoshkov 40dd77bf5a Make VIRTUAL_HandleFault return an NTSTATUS. 2005-07-15 11:43:09 +00:00
Alexandre Julliard 3be8cb8b02 Moved initialization of the default user process parameters to ntdll. 2005-07-14 12:33:30 +00:00
Alexandre Julliard 9ad5628639 Moved the server start time to the init_thread request and got rid of
the init_process request (based on a patch by Felix Nawothnig).
2005-07-14 10:32:46 +00:00
Alexandre Julliard 11ad6a0ac4 Return the startup info size in the init_thread request, and allocate
the process parameters structure in ntdll instead of kernel.
2005-07-13 19:43:35 +00:00
Alexandre Julliard d3a6a16efd Initialize relay debugging earlier on now that the registry is loaded
by the server.
2005-07-13 14:23:06 +00:00
Mike McCormack 6b636e3e7b Use RTL_CRITICAL_SECTION instead of CRITICAL_SECTION. 2005-06-25 18:00:57 +00:00
Alexandre Julliard ab29aa2126 Moved the ntdll per-thread data out of the TEB into a private
structure stored in TEB.SystemReserved2.
2005-06-06 20:04:33 +00:00
Alexandre Julliard e4412a618c Removed the special casing of kernel32 and ntdll for the TEB
definition in winternl.h.
2005-05-16 17:52:10 +00:00
Alexandre Julliard 26050b49d5 Prefix the internal name of all register functions with __regs_ for
better consistency and to make automated checking possible.
2005-05-07 18:10:30 +00:00
Mike McCormack f92fff66a2 Implemented NtSignalAndWaitForSingleObject. 2005-04-24 17:35:52 +00:00
Alexandre Julliard 3b843d3e7d Remove all traces of the VIRTUAL_SetFaultHandler support. 2005-04-20 16:26:23 +00:00
Robert Shearman 7572b125b5 Implement NtQueryTimer. 2004-12-13 21:10:58 +00:00
Alexander Yaworsky 8657ad8704 Make RtlCreateUserThread fail if process handle is not for the current
process.
2004-09-21 00:23:50 +00:00
Alexandre Julliard 9f58ee709d Set the system directory in ntdll as soon as we have determined it. 2004-07-15 22:07:21 +00:00
Alexandre Julliard fd9792bdc9 Added support for the IMAGE_FILE_LARGE_ADDRESS_AWARE flag. 2004-06-18 00:26:57 +00:00
Eric Pouech db52588754 Const correctness. 2004-06-15 00:47:00 +00:00
Alexandre Julliard 9db147e5e4 Make DIR_nt_to_unix return STATUS_NO_SUCH_FILE instead of
STATUS_OBJECT_NAME_NOT_FOUND to indicate that the last component
didn't exist to allow distinguishing it from legitimate errors.
Export it from ntdll, renamed to wine_nt_to_unix_file_name.
2004-04-23 02:46:18 +00:00