On Mon, 7 May 2001, John Polstra wrote:
> In article
> <[EMAIL PROTECTED]>, Daniel
> Eischen <[EMAIL PROTECTED]> wrote:
>
> > I think the only reason we used %fs instead of %gs was WINE. I
> > think Linux uses %gs for TSD, so if WINE were to ever depend on
> > linuxthreads, one of them would have to change.
>
> At least on Red Hat 7.0 (glibc-2.1.92-14), Linux does not use a
> segment register to find TSD. It aligns all stacks at a multpile
> of 2MB and then does bit ops on the current stack pointer to find a
> thread control block at the base (highest address) of the stack.
>
> There is an alternate implementation in that version of glibc which
> uses %gs to find TSD. However, it is not used in this version of
> Linux. I don't know whether it's used in other versions or not.
I was looking at our linuxthreads port and noticed some %gs
fiddling. If linuxthreads wants to allow POSIX semantics for
specifying thread stack allocation, they'll have to stop relying
on stack alignments for TSD.
--
Dan Eischen
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message