Added new CLIENT_DebuggerRequest routine, implemented support for
DEBUGGER_FREEZE_ALL/DEBUGGER_UNFREEZE_ALL requests.
Run wine server in the main wine process.
Bugfix: never free initial thread!
diff --git a/server/thread.c b/server/thread.c
index bf8a2ca..e86cd6d 100644
--- a/server/thread.c
+++ b/server/thread.c
@@ -102,6 +102,7 @@
initial_thread.process = create_initial_process();
add_process_thread( initial_thread.process, &initial_thread );
add_client( fd, &initial_thread );
+ grab_object( &initial_thread ); /* so that we never free it */
select_loop();
}
@@ -242,6 +243,24 @@
return old_count;
}
+/* suspend all threads but the current */
+void suspend_all_threads( void )
+{
+ struct thread *thread;
+ for ( thread = first_thread; thread; thread = thread->next )
+ if ( thread != current )
+ suspend_thread( thread );
+}
+
+/* resume all threads but the current */
+void resume_all_threads( void )
+{
+ struct thread *thread;
+ for ( thread = first_thread; thread; thread = thread->next )
+ if ( thread != current )
+ resume_thread( thread );
+}
+
/* send a reply to a thread */
int send_reply( struct thread *thread, int pass_fd, int n,
... /* arg_1, len_1, ..., arg_n, len_n */ )