[52] in Pthreads mailing list archive
Re: thread states
daemon@ATHENA.MIT.EDU (Christopher Provenzano)
Sat Jul 29 01:42:38 1995
To: sudhir halbhavi <halbhavi@eecs.ukans.edu>
Cc: pthreads@MIT.EDU
In-Reply-To: Your message of "Tue, 18 Jul 1995 00:01:41 CDT."
<Pine.3.87.9507180041.A4053-0100000@noether>
Date: Sat, 29 Jul 1995 01:25:51 EDT
From: Christopher Provenzano <proven@MIT.EDU>
>
> Hi,
>
> Here is a scenario...
> Suppose a breakpoint is set on a function that all threads (at some time
> execute) and a thread hits a breakpoint, the thread that hit the
> breakpoint is the currently running thread (pthread_run points to it).
>
> The saved state of the running thread (which is in machdep data) is not
> the same as the present state of the thread (I am talking about the
> register states), because the thread presently running would have
> 'setjmp'ed some time back. Do I understand this right?
Yes.
>
> Also, the other threads are not running (I am assuming a non-threaded
> kernel here), since one thread is running at any time, their states
> are "current", so to speak - i.e the register states (pc, sp ..) all
> represent the state of the threads when the breakpoint is hit, because
> they would have done a context switch (and thus a setjmp) and waiting in
> one of the queues to be run again.
> Is this right?
Yes.
CAP