[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-patches
Subject: WaitForInputIdle
From: Peter Ganten <peter () ganten ! org>
Date: 1999-12-19 13:42:03
[Download RAW message or body]
Hello,
This patch implements WaitForInputIdle with our builtin user and
enables it with native user, by calling UserSignalProc (
USIG_PROCESS_RUNNING ... ) only for non-gui applications.
Again thanks to Ulrich Weigand for his help :-)
The patch adds two entries to the PDB structure, one for the idle
event of each win32 process (for win16 processes, a global event
is used) and one for a pointer to the main message queue of each
process. The main message queue is that queue, on which a thread
blocks the first time.
Changelog:
if1632/thunk.c, include/callback.h:
add WaitForInputIdle to the list of callout-functions
include/process.h:
Add two entries to the PDB structure: one for storing the
idle event and one for a handle to the process main
message queue. Add a prototype of MapProcessHandle.
loader/main.c:
Create a global idle event for all win16 processes.
windows/user.c:
create / destroy the idle event for win32 processes (subsystems)
on the approbiate user signals. For win16 processes the
global win16 idle event is used. The idle event will
be reset, when USIG_PROCESS_RUNNING is used.
scheduler/process.c:
create the idle event for the initial process. Call
UserSignalProc ( USIG_PROCESS_RUNNING ) only, if the
process is not win16 and not a win32 gui application.
windows/queue.c:
In QUEUE_WaitBits, set the main message queue of a process
to that queue, which the function blocks on the first time.
Also set / reset the idle event before calling
WaitForSingleObject. WaitForInputIdle will now check,
whether the calling process or the target process are
win16 or win32 gui applications. It checks further, if
a win16 process tries to wait on another win16 process
or if the calling thread is the owner of the queue to
wait for. WaitForInputIdle then calls
MsgWaitForMultipleObjects and processes sent messages.
windows/message.c:
In MsgWaitForMultipleObjects the same is done as in
QUEUE_WaitBits: The main message queue will be set,
if not allready done and the idle event will be set / reset
before the functions waits for objects.
loader/module.c:
Use WaitForInputIdle in LoadModule(). I have choosen a timeout
of one minute (don't know, what native kernel does.)
Greetings,
Peter
["WaitForInputIdle.patch" (application/octet-stream)]
=========================================================================
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic