[47] in Pthreads mailing list archive

home help back first fref pref prev next nref lref last post

thread states

daemon@ATHENA.MIT.EDU (sudhir halbhavi)
Tue Jul 18 03:19:51 1995

Date: Tue, 18 Jul 1995 00:01:41 -0500 (CDT)
From: sudhir halbhavi <halbhavi@eecs.ukans.edu>
To: pthreads@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?

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?

I'd appreciate it if somebody can provide some feedback on this.

Thanx a lot.

Sudhir Halbhavi		         email: halbhavi@eecs.ukans.edu
Graduate Student (EECS)          Web: http://www.eecs.ukans.edu/~halbhavi
University of Kansas, Lawrence   ** Mockery is the first reaction to fear*



home help back first fref pref prev next nref lref last post