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
31022d66
Commit
31022d66
authored
Aug 16, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Signal and release the idle event when the process main thread exits.
parent
5501f127
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
11 deletions
+23
-11
queue.c
server/queue.c
+21
-0
thread.c
server/thread.c
+1
-11
user.h
server/user.h
+1
-0
No files found.
server/queue.c
View file @
31022d66
...
...
@@ -163,6 +163,27 @@ static struct msg_queue *create_msg_queue( struct thread *thread )
return
queue
;
}
/* free the message queue of a thread at thread exit */
void
free_msg_queue
(
struct
thread
*
thread
)
{
struct
process
*
process
=
thread
->
process
;
if
(
!
thread
->
queue
)
return
;
if
(
process
->
queue
==
thread
->
queue
)
/* is it the process main queue? */
{
release_object
(
process
->
queue
);
process
->
queue
=
NULL
;
if
(
process
->
idle_event
)
{
set_event
(
process
->
idle_event
);
release_object
(
process
->
idle_event
);
process
->
idle_event
=
NULL
;
}
}
release_object
(
thread
->
queue
);
thread
->
queue
=
NULL
;
}
/* check the queue status */
inline
static
int
is_signaled
(
struct
msg_queue
*
queue
)
{
...
...
server/thread.c
View file @
31022d66
...
...
@@ -187,16 +187,7 @@ static void cleanup_thread( struct thread *thread )
if
(
thread
->
request_fd
!=
-
1
)
close
(
thread
->
request_fd
);
if
(
thread
->
reply_fd
!=
-
1
)
close
(
thread
->
reply_fd
);
if
(
thread
->
wait_fd
!=
-
1
)
close
(
thread
->
wait_fd
);
if
(
thread
->
queue
)
{
if
(
thread
->
process
->
queue
==
thread
->
queue
)
{
release_object
(
thread
->
process
->
queue
);
thread
->
process
->
queue
=
NULL
;
}
release_object
(
thread
->
queue
);
thread
->
queue
=
NULL
;
}
free_msg_queue
(
thread
);
destroy_thread_windows
(
thread
);
for
(
i
=
0
;
i
<
MAX_INFLIGHT_FDS
;
i
++
)
{
...
...
@@ -795,7 +786,6 @@ DECL_HANDLER(new_thread)
return
;
}
kill_thread
(
thread
,
1
);
request_fd
=
-
1
;
}
}
...
...
server/user.h
View file @
31022d66
...
...
@@ -43,6 +43,7 @@ extern void *next_user_handle( user_handle_t *handle, enum user_object type );
/* queue functions */
extern
void
free_msg_queue
(
struct
thread
*
thread
);
extern
void
inc_queue_paint_count
(
struct
thread
*
thread
,
int
incr
);
extern
void
queue_cleanup_window
(
struct
thread
*
thread
,
user_handle_t
win
);
extern
void
post_message
(
user_handle_t
win
,
unsigned
int
message
,
...
...
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