Sebastian Lackner
bae3dcc295
server: Do not hold reference on parent process.
...
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-25 18:48:19 +09:00
Alexandre Julliard
f55db7882d
server: Add link_name and unlink_name object operations.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-04 21:07:19 +09:00
Sebastian Lackner
41f7f19cb5
server: Wake up APC if we fail to allocate a handle in target process.
...
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-05 20:22:38 +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
Dmitry Timoshkov
3bed65b5a9
server: For querying thread information demand THREAD_QUERY_LIMITED_INFORMATION access.
2015-08-21 14:35:04 +09:00
Dmitry Timoshkov
93e8bea2bd
server: Add implicit THREAD_[QUERY|SET]_LIMITED_INFORMATION access.
2015-08-21 14:34:59 +09:00
Sebastian Lackner
905bf79337
server: Store correct entry point for first thread.
2015-07-30 11:37:15 +02:00
Sebastian Lackner
845164004b
ntdll: Implement ThreadQuerySetWin32StartAddress info class in NtQueryInformationThread.
2015-07-29 21:44:03 +02:00
Sebastian Lackner
6ab494ceb5
ntdll: Implement ThreadQuerySetWin32StartAddress info class in NtSetInformationThread.
2015-07-29 21:44:03 +02:00
Sebastian Lackner
6156cf3134
server: Use a separate wineserver call to fetch thread times.
2015-07-29 21:44:03 +02:00
Sebastian Lackner
3db6d1acaf
server: Avoid sending unexpected wakeup with uninitialized cookie value.
...
The code for SELECT_SIGNAL_AND_WAIT in select_on() calls signal_object(). This might
wake up the same thread which is currently in the wineserver call. The value for
current->wait->cookie is initialized at the end of the function, and not defined yet
at this point.
2015-07-15 16:29:11 +09:00
André Hentschel
6adcad498c
server: Allow 32-bit connections on ARM64.
2015-05-06 08:41:50 +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
Sebastian Lackner
0e2e9e4efc
server: Avoid leaking file descriptor on error in create_thread function.
2014-11-18 14:14:18 +09:00
Sebastian Lackner
749e2aa36f
server: Close fd if there is no space in thread inflight fd list.
2014-11-17 17:27:01 +09:00
Sebastian Lackner
35e56fb042
server: Avoid invalid memory access when thread is killed while in wake_up(). (Valgrind).
2014-06-23 10:12:02 +02:00
Marcus Meissner
3068d827da
server: Use longer int in bitshift operation (Coverity).
2014-04-17 10:44:14 +02:00
Dmitry Timoshkov
383f7ba002
server: Add THREAD_[SET|QUERY]_LIMITED_INFORMATION to generic access mappings and appropriately change THREAD_ALL_ACCESS.
2014-02-06 17:08:33 +01:00
Dmitry Timoshkov
6e2de14df1
server: Fix generic access mapping for a thread.
2014-02-05 13:49:30 +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
Alexandre Julliard
93fbb12e65
server: Implement waiting on keyed events.
2013-08-28 11:03:38 +02:00
Alexandre Julliard
d4cd051cef
server: Store abandoned state as a flag in the wait structure.
2013-08-27 23:48:37 +02:00
Alexandre Julliard
39644bb309
server: Pass a wait queue entry to the signaled/satisfied object functions.
2013-08-27 23:48:36 +02:00
Alexandre Julliard
de9f5b33b8
server: Store the wait structure in the wait entry and add an accessor function for the thread.
2013-08-27 23:48:31 +02:00
Alexandre Julliard
947e337480
server: Make signal and wait a separate select operation.
2013-08-26 20:34:28 +02:00
Alexandre Julliard
042e0046d4
server: Make select on all handles a separate operation.
2013-08-26 20:32:52 +02:00
Alexandre Julliard
c2ab7a625e
server: Add a structure to pass the parameters of a select request.
2013-08-26 20:24:42 +02:00
Dmitry Timoshkov
fd76b695b9
server: Set appropriate status for a terminated thread.
2013-05-13 11:10:12 +02:00
Alexandre Julliard
ea919d9de4
server: Use strerror instead of perror.
2013-05-07 12:19:22 +02:00
Dmitry Timoshkov
af3d73b035
server: Add a process flag indicating whether the process is terminating, use it to block thread creation in a being terminated process.
2013-05-07 11:25:49 +02:00
André Hentschel
0effd926b6
server: Remove SPARC support.
2013-03-05 11:04:07 +01:00
André Hentschel
d11e72f925
server: Add ARM64 support.
2013-01-16 12:49:20 +01:00
Alexandre Julliard
6d2063f41b
ntdll: Set the thread exit code when a thread is killed inside a wait.
2012-01-16 14:04:39 +01:00
André Hentschel
c7becc3015
server: Remove dead initializations (clang).
2011-07-06 11:20:37 +02:00
Alexandre Julliard
055c883ee0
server: Fix the status code for get/set_thread_context on a terminated thread.
2011-05-06 14:23:25 +02:00
Alexandre Julliard
5dc9c73c31
server: Check for the need to suspend a thread again once it leaves an exception or suspend block.
2011-05-06 12:49:57 +02:00
Alexandre Julliard
90982480f0
server: Add support for suspending the thread directly in the get/set_thread_context requests.
2011-05-06 12:40:52 +02:00
Alexandre Julliard
45075b2f9c
server: Add separate requests for getting/setting the thread context during suspend.
2011-05-06 12:25:34 +02:00
André Hentschel
417e926a80
server: Remove Alpha support.
2011-04-20 13:10:06 +02:00
Alexandre Julliard
500d77245c
server: Retrieve the Unix thread affinity for the initial thread.
2011-04-15 10:07:52 +02:00
André Hentschel
ccaeb3ed83
server: Add ARM support.
2010-09-20 12:59:53 +02:00
Alexandre Julliard
3557b9818c
server: Avoid a potential server crash when a thread dies on startup.
2010-08-23 19:59:57 +02:00
Alexandre Julliard
5532927ed3
server: Make sure a thread doesn't get freed while it's processing a request.
2010-05-16 12:34:28 +02:00
Alexandre Julliard
ac69fcb14f
server: Check that the prefix type can support the client architecture.
2010-05-04 20:27:20 +02:00
Alexandre Julliard
bbc03d5172
server: Use the prefix architecture instead of the server one to check for WoW processes.
2010-05-04 20:26:53 +02:00
Alexandre Julliard
ac08b038f0
server: Initial support for Wow64 registry redirection.
2010-03-02 12:03:17 +01:00
Alexandre Julliard
9ce56b2729
server: Set the initial thread affinity from the process.
2010-02-02 16:12:01 +01:00
Alexandre Julliard
2f3fa8596b
server: Allow changing a thread affinity before it is initialized.
2010-02-02 15:58:02 +01:00
Alexandre Julliard
a764fe8921
server: Use the correct thread id to set affinity.
2009-11-20 11:44:54 +01:00
Juan Lang
bfb4578356
server: A thread's affinity is restricted to the process affinity.
2009-10-01 11:33:33 +02:00
Juan Lang
474b2e4bfb
server: Use kernel support for thread affinity when available.
2009-09-30 14:34:32 +02:00
Juan Lang
24036fe13a
server: Setting a process's affinity sets all of its threads' affinities too.
2009-09-30 14:34:32 +02:00
Alexandre Julliard
fd78e6e3a5
server: Restart at the head of the wait queue when we woke a thread, since this can modify the queue.
2009-06-13 12:20:49 +02:00
Alexandre Julliard
5dcf157b5b
server: Hide a window before destroying it if it was still visible.
2009-06-03 11:29:15 +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
279defe66e
server: Verify that the client is using a supported CPU type.
2009-04-03 14:59:12 +02:00
Alexandre Julliard
653d2c4a8d
server: Store the type of CPU that the client is running on.
2009-04-03 14:49:10 +02:00
Alexandre Julliard
b06a919c3c
server: Use the thread entry point field to pass the PEB in the initial thread.
2009-04-03 14:30:34 +02:00
Alexandre Julliard
9f365e7705
server: Replace EXCEPTION_RECORD by an explicit definition in debug events.
2009-01-02 20:12:46 +01:00
Alexandre Julliard
bc03f0ee39
server: Simplify the debug_event_t structure.
2009-01-02 20:09:25 +01:00
Alexandre Julliard
fa8643805b
server: Make TEB and PEB client_ptr_t instead of void pointers.
2008-12-31 15:09:59 +01:00
Alexandre Julliard
c6c335d70e
server: Make thread entry points client_ptr_t instead of void pointers.
2008-12-31 15:09:59 +01:00
Alexandre Julliard
2cf868c0be
server: Move ldt_copy to the init_process_done request and make it a client_ptr_t.
2008-12-31 15:09:59 +01:00
Alexandre Julliard
f507ccbf52
server: Specify the user APC to call only once the system APC has executed.
2008-12-30 20:51:55 +01:00
Alexandre Julliard
7560a89022
server: Make padding explicit in the wake_up_reply structure.
2008-12-30 15:15:06 +01:00
Alexandre Julliard
45c991937a
server: Make the select cookie a client_ptr_t instead of a void pointer.
2008-12-29 17:21:32 +01:00
Alexandre Julliard
b660aaa9ea
server: Use the same field for process and thread handle in the queue_apc request.
2008-12-26 12:33:31 +01:00
H. Verbeet
ff870e0132
server: Calling ResumeThread() on a terminated thread is valid.
2008-07-23 11:21:47 +02:00
Alexandre Julliard
3bf12b9aca
server: Don't force the process affinity to 1, leave it up to the client.
2008-01-17 13:40:03 +01:00
Alexandre Julliard
3b244b95b2
server: Use SIGQUIT instead of SIGTERM to terminate a thread.
...
This allows keeping the default SIGTERM behavior of killing the whole
process.
2007-12-20 12:19:35 +01:00
Alexandre Julliard
8382eb01b2
server: Return correct object types in the get_directory_entry request.
2007-12-05 18:16:42 +01:00
Andrey Turkin
7a9210fa85
server: Pass Information field from async I/O APCs.
2007-11-15 14:24:50 +01:00
Rob Shearman
c1707d8938
server: Add get_sd and set_sd object operations to allow the security descriptor to be stored somewhere other than server memory, such as on disk.
2007-10-04 12:30:52 +02:00
Matt Jones
6763742090
server: Only commit SetThreadPriority if new priority is correct.
2007-07-25 13:59:17 +02:00
Alexandre Julliard
fec5117e91
server: Merge APC processing into the select request.
...
This is needed to return the correct value when one of the handles
being waited on is set to signaled state by the APC.
2007-07-16 16:14:45 +02:00
Alexandre Julliard
4c5b55a0f8
server: Run async I/O APCs from the SIGUSR1 handler.
2007-06-04 18:16:48 +02:00
Alexandre Julliard
48c5321586
server: Give system APCs priority over signaled objects.
2007-05-01 14:07:24 +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
635714397f
server: Add infrastructure for ioctl server request.
2007-04-16 14:45:03 +02:00
Alexandre Julliard
3f0575943e
server: Don't bother with default entry points for objects that don't even return an fd.
2007-04-12 20:21:53 +02:00
Alexandre Julliard
7a9363a4d4
server: Rename the get_file_info function to get_fd_type and get rid of the flags.
2007-04-10 22:26:23 +02:00
Alexandre Julliard
f85437c57f
server: Store the opening options in the file descriptor instead of in the individual objects.
...
Allows moving the FD_FLAG_OVERLAPPED support to the generic
get_handle_fd request handling.
2007-04-10 22:25:07 +02:00
Alexandre Julliard
72bff2e445
server: Add support for restarting an async I/O when the client side couldn't finish it right away.
2007-04-10 17:07:27 +02:00
Alexandre Julliard
7e71c1ddee
server: Add an open_file() function to the object operations.
2007-03-22 11:44:29 +01:00
Alexandre Julliard
8adce7765a
server: Notify the async object when the APC call completed.
2007-03-21 14:28:23 +01:00
Alexandre Julliard
52a9af7ecb
server: Grab the owner object of an APC while the APC is executing.
2007-03-20 19:22:39 +01:00
Andrew Talbot
b1788c8462
server: Replace inline static with static inline.
2007-03-17 20:05:05 +01:00
Alexandre Julliard
49868e3c93
server: Clear the thread wait before releasing objects to avoid nested calls.
...
Reported by Misha Koshelev.
2007-02-05 18:05:03 +01:00
Alexandre Julliard
f3cb4f7d94
ntdll: Avoid inter-process APCs when called for the process itself.
2007-01-18 15:41:05 +01:00
Alexandre Julliard
02e2fa7798
ntdll: Implementation of inter-process NtMapViewOfSection and NtUnmapViewOfSection.
2007-01-18 15:17:51 +01:00
Alexandre Julliard
8025f79ce1
ntdll: Implementation of inter-process RtlCreateUserThread.
2007-01-18 15:02:55 +01:00
Alexandre Julliard
c122260b9d
ntdll: Implemented NtLockVirtualMemory and NtUnlockVirtualMemory.
2007-01-16 09:50:08 +01:00
Alexandre Julliard
5a1ad74a67
ntdll: Implementation of inter-process NtFlushVirtualMemory.
2007-01-15 22:31:07 +01:00
Alexandre Julliard
1ea968016f
ntdll: Implementation of inter-process VirtualProtectEx.
2007-01-15 22:30:04 +01:00
Alexandre Julliard
3d00239586
ntdll: Implementation of inter-process VirtualQueryEx.
2007-01-15 22:28:42 +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
fb40dc4099
server: Added mechanism for returning results of APC calls.
...
Defined APC_VIRTUAL_ALLOC and APC_VIRTUAL_FREE requests.
2007-01-15 22:24:40 +01:00
Alexandre Julliard
46d7fa4852
server: Properly wake the waiting threads when an APC is cancelled.
2007-01-15 20:02:05 +01:00
Alexandre Julliard
2520e387a1
server: Allow suspended threads to run system APCs.
2007-01-10 21:55:23 +01:00
Alexandre Julliard
5c8421d3e7
server: Add a generic apc_call structure to make it easier to extend, and more type-safe.
2007-01-04 13:40:09 +01:00
Alexandre Julliard
49b49c30fc
server: Notify the server that an APC has completed in the next get_apc call.
2007-01-04 13:17:53 +01:00
Alexandre Julliard
2606ad538b
server: Make thread_apc into a real object.
2007-01-04 12:36:33 +01:00
Alexandre Julliard
48b74b3237
server: Split get_thread_from_pid to allow lookups by tid or pid only.
2006-12-29 16:53:33 +01:00
Michael Stefaniuc
5cecceccb2
server: Remove redundant NULL check before free() (found by Smatch).
2006-10-10 12:56:16 +02:00
Eric Pouech
8cb932ea89
ntdll: Implemented AmILastThread information class for NtQueryInformationThread.
2006-10-03 20:20:13 +02:00
Mike McCormack
261691fa2f
server: Use ntdll values where possible.
2006-08-23 12:01:10 +02:00
Alexandre Julliard
68e850e602
server: Send a SIGKILL to processes that don't terminate properly.
2006-08-14 20:19:42 +02:00
Alexandre Julliard
753c8706f5
server: Only call gettimeofday once per poll loop.
2006-08-10 16:42:09 +02:00
Thomas Kho
3538c0cdce
server: Remove unused thread_apc member.
2006-08-03 18:20:20 +02: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
3095a48d6f
server: Convert thread creation/exit times to the abs_time_t type.
2006-07-26 14:49:55 +02:00
Ge van Geldorp
5d88b27d0d
server: The "select" call passes handles, not ints.
2006-07-03 11:37:14 +02:00
Alexandre Julliard
86d4688171
server: Moved some common bits of get/set_thread_context to thread.c.
2006-06-23 13:16:14 +02:00
Mike McCormack
1ec3e9fe7d
server: Fix a win64 warning.
2006-06-15 11:39:29 +02:00
Alexandre Julliard
5558652ea3
server: Don't report a fatal protocol error for things that we can recover from.
2006-06-08 10:26:02 +02:00
Jonathan Ernst
360a3f9142
Update the address of the Free Software Foundation.
2006-05-23 14:11:13 +02:00
Robert Shearman
b02e6b0926
server: Threads should start off without having an impersonation token.
2006-05-05 16:36:05 +02:00
Alexandre Julliard
17de829096
server: Use the standard suspend mechanism to simulate a breakpoint
...
in an active process, instead of sending a SIGTRAP.
2006-04-19 19:45:39 +02:00
Alexandre Julliard
820c5927c8
server: Removed the thread attached flag, since we always detach now.
2006-04-10 20:25:22 +02:00
Alexandre Julliard
cb70931f67
server: Moved read/write_process_memory and get_selector_entry to ptrace.c.
2006-04-07 19:52:12 +02: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
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
46d1b3e8da
server: Added access rights mapping to process and thread objects.
2005-12-12 15:03:07 +01:00
Alexandre Julliard
28beba31d6
server: Added infrastructure for access rights mapping.
2005-12-12 14:57:40 +01:00
Alexandre Julliard
24560e70bb
server: Make alloc_handle use attributes instead of inherit flag.
2005-12-09 13:58:25 +01:00
Alexandre Julliard
f2d7dd645e
server: Use attributes instead of inherit flag in process and thread requests.
2005-12-09 12:13:11 +01:00
Ge van Geldorp
1a1583a364
Match PSDK STATUS_* definitions.
2005-11-28 17:32:54 +01:00
Vitaliy Margolen
baffcb95d3
Add name_lookup function in object_ops.
2005-11-22 14:55:42 +00: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
3f85e26af2
Moved the platform-independent part of the get/set_thread_context
...
requests to a common file.
2005-11-02 14:12:13 +00:00
Alexandre Julliard
ff7795ef4c
Don't send an extra signal when waiting for a debug event, just do a
...
normal wait. Return the debug event status directly as return value
of the server call.
2005-11-01 21:47:07 +00:00
Alexandre Julliard
867ae269d4
Remove an exiting thread from the process only after thread cleanup to
...
avoid accessing freed window classes.
2005-09-14 15:44:12 +00:00
Alexandre Julliard
1b2adad892
Don't try to detach from a thread that is exiting, to avoid triggering
...
a kernel race condition.
2005-08-22 10:13:28 +00:00
Mike McCormack
e659f1e60c
Fix some gcc 4.0 warnings.
2005-08-09 10:37:50 +00:00
Alexandre Julliard
f895ad180d
Fixed a couple of error codes.
2005-07-29 14:41:14 +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
4391be583e
Get rid of the boot_done request.
2005-07-13 14:20:13 +00:00
Alexandre Julliard
0424f38169
Already initialize the process in the first init_thread request
...
instead of waiting for the init_process request.
2005-07-13 12:12:43 +00:00
Alexandre Julliard
92fec7b67a
Keep track of the windows and hooks used by a thread to properly
...
refuse to change the thread desktop when it's in use.
2005-06-28 19:37:52 +00:00
Mike McCormack
390bc5f52f
Don't include winbase.h when it's not necessary.
2005-06-21 09:46:15 +00:00
Robert Shearman
4bba21643c
Add support for impersonating a token.
2005-06-20 13:18:38 +00:00
Robert Shearman
3795709344
Change code style of form "if( x )" to "if (x)" for consistency.
2005-06-10 19:54:46 +00:00
Alexandre Julliard
b9b1ea9c9f
Added a close_handle method to the object operations, and use it to
...
implement registry notifications and the strange behavior of
CloseHandle on winstation/desktop handles.
2005-06-09 15:39:52 +00:00
Alexandre Julliard
78a3e63377
The desktop of a new thread should be set from the process initial
...
desktop, not from the parent thread.
Fixed a couple of bugs in the desktop name handling.
2005-06-09 12:07:12 +00:00
Alexandre Julliard
1bf96e09a9
Beginnings of support for window stations and desktops.
2005-06-08 18:44:50 +00:00
Mike McCormack
f92fff66a2
Implemented NtSignalAndWaitForSingleObject.
2005-04-24 17:35:52 +00:00
Robert Shearman
d2ea92d14e
- Clean up well-known privileges.
...
- Implement checking tokens for privileges in the server.
- Implement NtPrivilegeCheck.
2005-04-22 21:17:15 +00:00
Steven Edwards
5727918424
Added a check for poll.h.
2005-03-04 12:38:36 +00:00
Alexandre Julliard
aa34768677
Convert the object wait queue to a standard list.
2005-03-01 11:49:58 +00:00