Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Nov 2000 20:13:07 -0500 (EST)
From:      Daniel Eischen <eischen@vigrid.com>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        arch@FreeBSD.org, Jonathan Lemon <jlemon@flugsvamp.com>
Subject:   Re: Thread-specific data and KSEs
Message-ID:  <Pine.SUN.3.91.1001121201152.11654A-100000@pcnet1.pcnet.com>
In-Reply-To: <XFMail.001121171036.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 21 Nov 2000, John Baldwin wrote:
> 
> On 22-Nov-00 Daniel Eischen wrote:
> > On Tue, 21 Nov 2000, Jonathan Lemon wrote:
> >> On Tue, Nov 21, 2000 at 06:51:59PM -0500, Daniel Eischen wrote:
> >> > I'm going to start working on the user-side of the new threads
> >> > library.  I need to be able to quickly get at the current KSE
> >> > (or perhaps KSEG).  Can we define a register on each architecture
> >> > that should not be used by FreeBSD ABI compliant applications?
> >> > The register doesn't have to be 32 bits or larger, just large
> >> > enough to hold the maximum number of KSEs (or KSEGs).
> >> 
> >> Um.  On a i386 I'm not sure this will be practical, there aren't 
> >> a whole lot of architecturally visible registers for use by the
> >> application.
> > 
> > Why can't we use a segment register?
> 
> %cs = code segment and is taken
> %ds = data segment and is taken
> %es = not sure, but bet it isn't safe
> %ss = stack, taken
> %fs = per-CPU data

Isn't this kernel-only?

> %gs ?  as I mentioned in my other message, this one might be useful for
> addressing a structure of thread-local variables much like %fs is used for
> per-CPU data.  It also has value in that supposedly x86-64 (aka k64) has both
> %fs and %gs, but no other seg regs.

All I need is one.

--
"Some may prefer open source, but me, I prefer open bar."
                                      -- Spencer F. Katt



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SUN.3.91.1001121201152.11654A-100000>