OSDN Git Service

2001-06-12 Michael Snyder <msnyder@redhat.com>
authorMichael Snyder <msnyder@specifix.com>
Fri, 6 Jul 2001 19:06:24 +0000 (19:06 +0000)
committerMichael Snyder <msnyder@specifix.com>
Fri, 6 Jul 2001 19:06:24 +0000 (19:06 +0000)
commit6fec67d40bcc3cbd53521c605d538db6b44e8ef2
treeb1ffa94106980201e9c2c753f673819e8a58698e
parentd30f071864b3938dd9d197547c65b33980a243f8
2001-06-12  Michael Snyder  <msnyder@redhat.com>

* lin-lwp.c: Prevent thread starvation by using a monte carlo
method to choose which of several event threads to handle next.

(stop_wait_callback): Defer pushback of breakpoint events until
later; add SIGTRAP events to the queue of unhandled events.
Keep calling waitpid until SIGSTOP retrieved.  If more than one
non-SIGSTOP event is retrieved, push them back onto the process
queue using kill.
(count_events_callback, select_singlestep_lwp_callback,
select_event_lwp_callback, cancel_breakpoints_callback,
select_event_lwp): New functions.  Implement monte carlo method
for selecting which of several SIGTRAP threads to handle next.
Push back the breakpoint event for all threads other than the
selected one.
(lin_lwp_wait): Call select_event_lwp to decide which of several
sigtrapped lwps to handle next.
(resume_callback): Disable code that attempts to handle
step_resume breakpoints.  Let core gdb handle this.
gdb/ChangeLog
gdb/lin-lwp.c