Date: Sun, 23 Jul 2006 18:19:30 +0200 From: Tijl Coosemans <tijl@ulyssis.org> To: freebsd-hackers@freebsd.org Subject: Re: WINE vs. FreeBSD Message-ID: <200607231819.37642.tijl@ulyssis.org> In-Reply-To: <20060723091824.GA79726@stud.fit.vutbr.cz> References: <200607221914.15826.lofi@freebsd.org> <Pine.GSO.4.64.0607221912140.4394@sea.ntplx.net> <20060723091824.GA79726@stud.fit.vutbr.cz>
next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart16024009.7F5hMMiKkD Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sunday 23 July 2006 11:18, Divacky Roman wrote: > On Sat, Jul 22, 2006 at 07:15:35PM -0400, Daniel Eischen wrote: > > I think it is because WINE stomps on or TLS. Nothing we can > > do about that except patch wine so it doesn't. Look at the > > console messages for: > > > > Warning: pid XXX used static ldt allocation Wine's LDT code could probably be improved to bring in LDT_AUTO_ALLOC=20 and/or use the GDT entry for %fs through i386_set_fsbase() for TLS=20 instead of allocating an LDT entry (per thread). But, I don't think=20 this is currently a problem. As far as I can see FreeBSD's TLS support=20 doesn't use the LDT (anymore) so wine's static ldt allocation can't=20 possibly interfere with it. > I dont know details but judging from what linux does I think it might > be that wine requires more then one GDT entry for TLS areas. at least > comment in linux sources suggests so. > > linux has 3 GDT entries for TLS while fbsd just 1. Wine on FreeBSD doesn't use the GDT (yet?). It allocates LDT entries for=20 TLS which should work just as well. In any case, FreeBSD and Linux don't differ that much in this. =46reeBSD has 2 GDT entries available, one for %gs which is used by the=20 threading libs (following http://people.redhat.com/drepper/tls.pdf I=20 suppose) and one for %fs which is used by win32 code so wine could use=20 this instead of the LDT way. The related (undocumented) libc functions=20 are i386_get_fsbase, i386_set_fsbase, i386_get_gsbase and=20 i386_set_gsbase. Linux reserves 3 GDT entries, that can be manipulated through one=20 syscall (set_thread_area) and then it's up to the user to point %fs=20 or %gs (or some other selector?) to one of these entries. --nextPart16024009.7F5hMMiKkD Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (FreeBSD) iD8DBQBEw6GZdMR2xnarec8RAiFCAKC/ac0cKBUNYC4YQm39cx7HsxjAWwCglwuq L+gCHC+iXaMNY/q2S4I8pz0= =VBHV -----END PGP SIGNATURE----- --nextPart16024009.7F5hMMiKkD--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607231819.37642.tijl>