Date: Mon, 7 May 2001 09:47:42 -0700 (PDT) From: John Polstra <jdp@polstra.com> To: current@freebsd.org Cc: eischen@vigrid.com Subject: Re: Rfork'd threads, signals, and LDTs Message-ID: <200105071647.f47GlgQ64138@vashon.polstra.com> In-Reply-To: <Pine.SUN.3.91.1010507073832.26371A-100000@pcnet1.pcnet.com> References: <Pine.SUN.3.91.1010507073832.26371A-100000@pcnet1.pcnet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <Pine.SUN.3.91.1010507073832.26371A-100000@pcnet1.pcnet.com>, Daniel Eischen <eischen@vigrid.com> 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. John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105071647.f47GlgQ64138>