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
5dc9c73c
Commit
5dc9c73c
authored
May 06, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Check for the need to suspend a thread again once it leaves an exception or suspend block.
parent
e1eb6228
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
4 deletions
+20
-4
debugger.c
server/debugger.c
+6
-1
process.c
server/process.c
+1
-1
thread.c
server/thread.c
+12
-2
thread.h
server/thread.h
+1
-0
No files found.
server/debugger.c
View file @
5dc9c73c
...
...
@@ -308,7 +308,11 @@ static void debug_event_destroy( struct object *obj )
break
;
}
}
if
(
event
->
sender
->
context
==
&
event
->
context
)
event
->
sender
->
context
=
NULL
;
if
(
event
->
sender
->
context
==
&
event
->
context
)
{
event
->
sender
->
context
=
NULL
;
stop_thread_if_suspended
(
event
->
sender
);
}
release_object
(
event
->
sender
);
release_object
(
event
->
debugger
);
}
...
...
@@ -680,6 +684,7 @@ DECL_HANDLER(get_exception_status)
data_size_t
size
=
min
(
sizeof
(
context_t
),
get_reply_max_size
()
);
set_reply_data
(
&
event
->
context
,
size
);
current
->
context
=
NULL
;
stop_thread_if_suspended
(
current
);
}
set_error
(
event
->
status
);
}
...
...
server/process.c
View file @
5dc9c73c
...
...
@@ -1045,7 +1045,7 @@ DECL_HANDLER(init_process_done)
set_process_startup_state
(
process
,
STARTUP_DONE
);
if
(
req
->
gui
)
process
->
idle_event
=
create_event
(
NULL
,
NULL
,
0
,
1
,
0
,
NULL
);
if
(
current
->
suspend
+
process
->
suspend
>
0
)
stop_threa
d
(
current
);
stop_thread_if_suspende
d
(
current
);
if
(
process
->
debugger
)
set_process_debug_flag
(
process
,
1
);
}
...
...
server/thread.c
View file @
5dc9c73c
...
...
@@ -491,6 +491,12 @@ void stop_thread( struct thread *thread )
if
(
is_process_init_done
(
thread
->
process
))
send_thread_signal
(
thread
,
SIGUSR1
);
}
/* stop a thread if it's supposed to be suspended */
void
stop_thread_if_suspended
(
struct
thread
*
thread
)
{
if
(
thread
->
suspend
+
thread
->
process
->
suspend
>
0
)
stop_thread
(
thread
);
}
/* suspend a thread */
static
int
suspend_thread
(
struct
thread
*
thread
)
{
...
...
@@ -1182,7 +1188,7 @@ DECL_HANDLER(init_thread)
}
if
(
process
->
unix_pid
!=
current
->
unix_pid
)
process
->
unix_pid
=
-
1
;
/* can happen with linuxthreads */
if
(
current
->
suspend
+
process
->
suspend
>
0
)
stop_threa
d
(
current
);
stop_thread_if_suspende
d
(
current
);
generate_debug_event
(
current
,
CREATE_THREAD_DEBUG_EVENT
,
&
req
->
entry
);
set_thread_affinity
(
current
,
current
->
affinity
);
}
...
...
@@ -1556,7 +1562,11 @@ DECL_HANDLER(get_suspend_context)
if
(
current
->
suspend_context
)
{
set_reply_data_ptr
(
current
->
suspend_context
,
sizeof
(
context_t
)
);
if
(
current
->
context
==
current
->
suspend_context
)
current
->
context
=
NULL
;
if
(
current
->
context
==
current
->
suspend_context
)
{
current
->
context
=
NULL
;
stop_thread_if_suspended
(
current
);
}
current
->
suspend_context
=
NULL
;
}
else
set_error
(
STATUS_INVALID_PARAMETER
);
/* not suspended, shouldn't happen */
...
...
server/thread.h
View file @
5dc9c73c
...
...
@@ -106,6 +106,7 @@ extern struct thread *get_thread_from_handle( obj_handle_t handle, unsigned int
extern
struct
thread
*
get_thread_from_tid
(
int
tid
);
extern
struct
thread
*
get_thread_from_pid
(
int
pid
);
extern
void
stop_thread
(
struct
thread
*
thread
);
extern
void
stop_thread_if_suspended
(
struct
thread
*
thread
);
extern
int
wake_thread
(
struct
thread
*
thread
);
extern
int
add_queue
(
struct
object
*
obj
,
struct
wait_queue_entry
*
entry
);
extern
void
remove_queue
(
struct
object
*
obj
,
struct
wait_queue_entry
*
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