__thread support in -current..
Ok, so having thrashed out what is required on the threads list (and severely strained (but hopefully not permanently) our relations with the OpenGL folks) we've figured out that we do need to support __thread (if we don't we'll miss out on alot). I have basicaly worked out what we need to do (Generarlly we do the same as solaris does) to support this.. The question is, what do we need to do for gcc and the loader to support this..? I guess the support is in gcc as Linux and solaris use it, but is our linker close enough to what they use to be able to benefit at all from them? Julian ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: __thread support in -current..
On Tue, 17 Jun 2003 15:34:15 -0700 (PDT) Julian Elischer [EMAIL PROTECTED] wrote: I guess the support is in gcc as Linux and solaris use it, but is our linker close enough to what they use to be able to benefit at all from them? The __thread support is available in GCC 3.3+ only. The new compiler is likely to enter the tree at the end of this month/first week of June. -- Alexander Kabaev ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: __thread support in -current..
On Tue, Jun 17, 2003 at 03:34:15PM -0700, Julian Elischer wrote: Ok, so having thrashed out what is required on the threads list (and severely strained (but hopefully not permanently) our relations with the OpenGL folks) we've figured out that we do need to support __thread (if we don't we'll miss out on alot). I have basicaly worked out what we need to do (Generarlly we do the same as solaris does) to support this.. The question is, what do we need to do for gcc and the loader to support this..? I guess the support is in gcc as Linux and solaris use it, but is our linker close enough to what they use to be able to benefit at all from them? From my posting to threads@: \begin{quote} ... To support the __thread keyword, our thread library needs to create the TLS as defined in the binary and its dependent shared libraries by virtue of the .tdata and .tbss sections/segments, based on the image of the TLS as constructed by the RTLD for the initial set of modules (created for the initial thread) and amended by TLS space defined in the dynamicly loaded libraries; and the TLS has to be created for every new thread at the time the thread itself is created. This TLS allocation has to be made accessable in accordance with runtime specifications for the supported architectures (libthr: i386 ia64; libkse: i386 currently -- more to follow) and in line with the access sequences created by the compiler, and using the static relocations known to the static linker and dynamic relocations of which the support needs to be added to RTLD. The static TLS model requires the least amount of work: add support to allocate the TLS image for every thread creation and point the thread pointer to it in a way compatible with the runtime spec. The dynamic TLS model requires more substantial changes and involves RTLD as well. This is the model that requires __tls_get_addr(). \end{quote} HTH, -- Marcel Moolenaar USPA: A-39004 [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: __thread support in -current..
see my answer to you there.. On Tue, 17 Jun 2003, Marcel Moolenaar wrote: On Tue, Jun 17, 2003 at 03:34:15PM -0700, Julian Elischer wrote: Ok, so having thrashed out what is required on the threads list (and severely strained (but hopefully not permanently) our relations with the OpenGL folks) we've figured out that we do need to support __thread (if we don't we'll miss out on alot). I have basicaly worked out what we need to do (Generarlly we do the same as solaris does) to support this.. The question is, what do we need to do for gcc and the loader to support this..? I guess the support is in gcc as Linux and solaris use it, but is our linker close enough to what they use to be able to benefit at all from them? From my posting to threads@: \begin{quote} ... To support the __thread keyword, our thread library needs to create the TLS as defined in the binary and its dependent shared libraries by virtue of the .tdata and .tbss sections/segments, based on the image of the TLS as constructed by the RTLD for the initial set of modules (created for the initial thread) and amended by TLS space defined in the dynamicly loaded libraries; and the TLS has to be created for every new thread at the time the thread itself is created. This TLS allocation has to be made accessable in accordance with runtime specifications for the supported architectures (libthr: i386 ia64; libkse: i386 currently -- more to follow) and in line with the access sequences created by the compiler, and using the static relocations known to the static linker and dynamic relocations of which the support needs to be added to RTLD. The static TLS model requires the least amount of work: add support to allocate the TLS image for every thread creation and point the thread pointer to it in a way compatible with the runtime spec. The dynamic TLS model requires more substantial changes and involves RTLD as well. This is the model that requires __tls_get_addr(). \end{quote} HTH, -- Marcel Moolenaar USPA: A-39004 [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: __thread support in -current..
On Tue, 17 Jun 2003, Julian Elischer wrote: I guess the support is in gcc as Linux and solaris use it, but is our linker close enough to what they use to be able to benefit at all from them? We'll need an updated GCC at the very least; I see some stuff in binutils regarding TLS. I think we're going to get updated binutils anway. -- | Matthew N. Dodd | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD | | [EMAIL PROTECTED] | 2 x '84 Volvo 245DL| ix86,sparc,pmax | | http://www.jurai.net/~winter | For Great Justice! | ISO8802.5 4ever | ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED]