This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH RFA/RFC] Don't use lwp_from_thread() in thread_db_wait()
- From: David Taylor <taylor at candd dot org>
- To: Daniel Jacobowitz <drow at mvista dot com>
- Cc: Kevin Buettner <kevinb at redhat dot com>, gdb-patches at sources dot redhat dot com
- Date: Wed, 13 Mar 2002 13:38:19 -0500
- Subject: Re: [PATCH RFA/RFC] Don't use lwp_from_thread() in thread_db_wait()
> Date: Wed, 13 Mar 2002 12:46:32 -0500
> From: Daniel Jacobowitz <drow@mvista.com>
>
> On Wed, Mar 13, 2002 at 12:37:08PM -0500, David Taylor wrote:
> > > Date: Tue, 12 Mar 2002 11:23:31 -0500
> > > From: Daniel Jacobowitz <drow@mvista.com>
> >
> > > Yes, that could probably be arranged. Someday we should talk to a
> > > vendor of an M:N threads package and see what we have to work with. I
> > > don't know of any offhand besides NGPT.
> >
> > If I understand you correctly, then: Solaris.
>
> Is it really?
>
> To clarify, LinuxThreads has one thread per process; IBM's NGPT has
> multiple threads per process, but still multiple processes. I was
> under the impression that Solaris LWPs would have all threads in one
> process.
>
> (except of course the terminology gets fuzzy here. One "process" in
> Solaris includes multiple LWPs which can be executing at the same time.
> If my understanding above is correct it might be more appropriate to
> call Solaris one-thread-per-LWP).
Perhaps I misunderstood. Or perhaps it's just a terminology issue.
Solaris >= 2.5.1 has a two level threads implementation --
. threads, sometimes called user threads
. light weight processes, sometimes called kernel threads
They are all part of one process. You can have M user threads mapped
onto N LWPs.
There are two sorts of signals in Solaris -- synchronous (some LWP
executing some thread caused the signal -- e.g., SIGILL, SIGSEGV) and
asynchronous (e.g., SIGINT, SIGQUIT, SIGSTOP, SIGKILL). Synchronous
signals are delivered to the thread/lwp that caused the signal;
asynchronous signals are delivered to the asychronous signal LWP
(ASLWP), arbitrary thread.