rfc:tls
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:tls [2008/08/26 14:25] – . lbarnaud | rfc:tls [2010/01/08 21:11] – external edit 127.0.0.1 | ||
---|---|---|---|
Line 34: | Line 34: | ||
Unfortunately the TLS model used in these tests was the static model, which is restrictive, | Unfortunately the TLS model used in these tests was the static model, which is restrictive, | ||
- | For the PHP module to be able to be loaded at runtime in Apache or an other server with this patch enabled, it has to be built with the static | + | For the PHP module to be able to be loaded at runtime in Apache or an other server with this patch enabled, it has to be built with the dynamic |
Native TLS can be enabled with %%--with-tsrm-__thread-tls%% or %%--with-tsrm-full__thread-tls%%. The last declares globals statically instead of making them pointers. | Native TLS can be enabled with %%--with-tsrm-__thread-tls%% or %%--with-tsrm-full__thread-tls%%. The last declares globals statically instead of making them pointers. | ||
Line 91: | Line 91: | ||
===== Windows ===== | ===== Windows ===== | ||
- | Dynamically loaded DLLs can use TLS starting with Windows Vista and Server 2008. But there is a restriction: | + | Dynamically loaded DLLs can use TLS starting with Windows Vista and Server 2008. But there is a restriction: |
===== TLS internals ===== | ===== TLS internals ===== | ||
Line 99: | Line 99: | ||
==== Static model ==== | ==== Static model ==== | ||
- | Each block is allocated at a fixed (linker-defined) offset from an address specific to each thread. As this address can be accessed very quickly, this allows very quick access to each TLS block. For instance, on Linux/ | + | Each block is allocated at a fixed (loader-defined) offset from an address specific to each thread. As this address can be accessed very quickly, this allows very quick access to each TLS block. For instance, on Linux/ |
The way the static model works requires that the memory needed by each TLS variable to be allocated before program startup. This means that the static model can not be used in shared libraries loaded at runtime. | The way the static model works requires that the memory needed by each TLS variable to be allocated before program startup. This means that the static model can not be used in shared libraries loaded at runtime. |
rfc/tls.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1