Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
7d4e2848
Commit
7d4e2848
authored
Dec 16, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Any thread can set the idle event, don't treat the first one differently.
parent
b57cc556
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
18 deletions
+23
-18
msg.c
dlls/user32/tests/msg.c
+21
-0
process.c
server/process.c
+0
-2
process.h
server/process.h
+0
-2
queue.c
server/queue.c
+2
-14
No files found.
dlls/user32/tests/msg.c
View file @
7d4e2848
...
...
@@ -12041,13 +12041,26 @@ static const struct
/* 10 */
{
0
,
0
,
TRUE
},
{
0
,
0
,
FALSE
},
{
0
,
WAIT_TIMEOUT
,
FALSE
},
{
0
,
0
,
FALSE
},
};
static
DWORD
CALLBACK
do_wait_idle_child_thread
(
void
*
arg
)
{
MSG
msg
;
PeekMessage
(
&
msg
,
0
,
0
,
0
,
PM_NOREMOVE
);
Sleep
(
200
);
MsgWaitForMultipleObjects
(
0
,
NULL
,
FALSE
,
100
,
QS_ALLINPUT
);
return
0
;
}
static
void
do_wait_idle_child
(
int
arg
)
{
WNDCLASS
cls
;
MSG
msg
;
HWND
hwnd
=
0
;
HANDLE
thread
;
DWORD
id
;
HANDLE
start_event
=
OpenEventA
(
EVENT_ALL_ACCESS
,
FALSE
,
"test_WaitForInputIdle_start"
);
HANDLE
end_event
=
OpenEventA
(
EVENT_ALL_ACCESS
,
FALSE
,
"test_WaitForInputIdle_end"
);
...
...
@@ -12146,6 +12159,14 @@ static void do_wait_idle_child( int arg )
MsgWaitForMultipleObjects
(
0
,
NULL
,
FALSE
,
100
,
QS_ALLINPUT
);
SetEvent
(
start_event
);
break
;
case
13
:
SetEvent
(
start_event
);
PeekMessage
(
&
msg
,
0
,
0
,
0
,
PM_NOREMOVE
);
Sleep
(
200
);
thread
=
CreateThread
(
NULL
,
0
,
do_wait_idle_child_thread
,
NULL
,
0
,
&
id
);
WaitForSingleObject
(
thread
,
10000
);
CloseHandle
(
thread
);
break
;
}
WaitForSingleObject
(
end_event
,
2000
);
CloseHandle
(
start_event
);
...
...
server/process.c
View file @
7d4e2848
...
...
@@ -328,7 +328,6 @@ struct thread *create_process( int fd, struct thread *parent_thread, int inherit
process
->
startup_state
=
STARTUP_IN_PROGRESS
;
process
->
startup_info
=
NULL
;
process
->
idle_event
=
NULL
;
process
->
queue
=
NULL
;
process
->
peb
=
0
;
process
->
ldt_copy
=
0
;
process
->
winstation
=
0
;
...
...
@@ -423,7 +422,6 @@ static void process_destroy( struct object *obj )
if
(
process
->
msg_fd
)
release_object
(
process
->
msg_fd
);
list_remove
(
&
process
->
entry
);
if
(
process
->
idle_event
)
release_object
(
process
->
idle_event
);
if
(
process
->
queue
)
release_object
(
process
->
queue
);
if
(
process
->
id
)
free_ptid
(
process
->
id
);
if
(
process
->
token
)
release_object
(
process
->
token
);
}
...
...
server/process.h
View file @
7d4e2848
...
...
@@ -23,7 +23,6 @@
#include "object.h"
struct
msg_queue
;
struct
atom_table
;
struct
handle_table
;
struct
startup_info
;
...
...
@@ -75,7 +74,6 @@ struct process
enum
startup_state
startup_state
;
/* startup state */
struct
startup_info
*
startup_info
;
/* startup info while init is in progress */
struct
event
*
idle_event
;
/* event for input idle */
struct
msg_queue
*
queue
;
/* main message queue */
obj_handle_t
winstation
;
/* main handle to process window station */
obj_handle_t
desktop
;
/* handle to desktop to use for new threads */
struct
token
*
token
;
/* security token associated with this process */
...
...
server/queue.c
View file @
7d4e2848
...
...
@@ -280,8 +280,6 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
for
(
i
=
0
;
i
<
NB_MSG_KINDS
;
i
++
)
list_init
(
&
queue
->
msg_list
[
i
]
);
thread
->
queue
=
queue
;
if
(
!
thread
->
process
->
queue
)
thread
->
process
->
queue
=
(
struct
msg_queue
*
)
grab_object
(
queue
);
}
release_object
(
input
);
return
queue
;
...
...
@@ -290,15 +288,8 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
/* free the message queue of a thread at thread exit */
void
free_msg_queue
(
struct
thread
*
thread
)
{
struct
process
*
process
=
thread
->
process
;
remove_thread_hooks
(
thread
);
if
(
!
thread
->
queue
)
return
;
if
(
process
->
queue
==
thread
->
queue
)
/* is it the process main queue? */
{
release_object
(
process
->
queue
);
process
->
queue
=
NULL
;
}
release_object
(
thread
->
queue
);
thread
->
queue
=
NULL
;
}
...
...
@@ -780,11 +771,8 @@ static int msg_queue_add_queue( struct object *obj, struct wait_queue_entry *ent
set_error
(
STATUS_ACCESS_DENIED
);
return
0
;
}
/* if waiting on the main process queue, set the idle event */
if
(
process
->
queue
==
queue
)
{
if
(
process
->
idle_event
)
set_event
(
process
->
idle_event
);
}
if
(
process
->
idle_event
)
set_event
(
process
->
idle_event
);
if
(
queue
->
fd
&&
list_empty
(
&
obj
->
wait_queue
))
/* first on the queue */
set_fd_events
(
queue
->
fd
,
POLLIN
);
add_queue
(
obj
,
entry
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment