digitalmars.D.learn - TLS
- M-exe (7/7) Mar 09 2017 I found that D is great language, but for my own reasons I'm
- rikki cattermole (2/8) Mar 09 2017 Wait, why on earth do you not want TLS?
- M-exe (6/19) Mar 09 2017 Compatibility issues (like under XP)
- rikki cattermole (3/19) Mar 09 2017 D does not support Windows XP.
- M-exe (3/6) Mar 09 2017 Let me care about it ;)
- bauss (4/11) Mar 10 2017 Mark your variables with __gshared. I would say shred, but it has
- sarn (2/5) Mar 10 2017 immutable variables are also not put in TLS.
- M-exe (3/8) Mar 13 2017 Thank you for yours replys but there is a tls directory even when
- Rainer Schuetze (3/12) Mar 13 2017 It's very likely that there are TLS variables in druntime that are
- Joakim (15/20) Mar 13 2017 You could probably modify druntime so that it doesn't use any
I found that D is great language, but for my own reasons I'm trying to use it without TLS at all. Can the TLS directory be avoided? (compiling on windows) I mean, can it avoided without losing GC and main language features? I found out that also when with -vtls there is no output, there is TLS Directory in the final binary.
Mar 09 2017
On 10/03/2017 7:41 PM, M-exe wrote:I found that D is great language, but for my own reasons I'm trying to use it without TLS at all. Can the TLS directory be avoided? (compiling on windows) I mean, can it avoided without losing GC and main language features? I found out that also when with -vtls there is no output, there is TLS Directory in the final binary.Wait, why on earth do you not want TLS?
Mar 09 2017
On Friday, 10 March 2017 at 06:46:03 UTC, rikki cattermole wrote:On 10/03/2017 7:41 PM, M-exe wrote:Compatibility issues (like under XP) Solutions like this is not enough stable: https://github.com/dlang/druntime/blob/master/src/core/sys/windows/dll.d I'm searching for solution like the /Zc:threadSafeInit- flag under VS2015I found that D is great language, but for my own reasons I'm trying to use it without TLS at all. Can the TLS directory be avoided? (compiling on windows) I mean, can it avoided without losing GC and main language features? I found out that also when with -vtls there is no output, there is TLS Directory in the final binary.Wait, why on earth do you not want TLS?
Mar 09 2017
On 10/03/2017 8:06 PM, M-exe wrote:On Friday, 10 March 2017 at 06:46:03 UTC, rikki cattermole wrote:D does not support Windows XP. If you absolutely require it, you will have to contact Walter about support.On 10/03/2017 7:41 PM, M-exe wrote:Compatibility issues (like under XP) Solutions like this is not enough stable: https://github.com/dlang/druntime/blob/master/src/core/sys/windows/dll.d I'm searching for solution like the /Zc:threadSafeInit- flag under VS2015I found that D is great language, but for my own reasons I'm trying to use it without TLS at all. Can the TLS directory be avoided? (compiling on windows) I mean, can it avoided without losing GC and main language features? I found out that also when with -vtls there is no output, there is TLS Directory in the final binary.Wait, why on earth do you not want TLS?
Mar 09 2017
On Friday, 10 March 2017 at 07:17:22 UTC, rikki cattermole wrote:D does not support Windows XP. If you absolutely require it, you will have to contact Walter about support.Let me care about it ;) I just need help with the TLS :)
Mar 09 2017
On Friday, 10 March 2017 at 07:33:44 UTC, M-exe wrote:On Friday, 10 March 2017 at 07:17:22 UTC, rikki cattermole wrote:Mark your variables with __gshared. I would say shred, but it has some restrictions to it, where __gshared is the equivalent to global variables in C.D does not support Windows XP. If you absolutely require it, you will have to contact Walter about support.Let me care about it ;) I just need help with the TLS :)
Mar 10 2017
On Friday, 10 March 2017 at 19:24:29 UTC, bauss wrote:Mark your variables with __gshared. I would say shred, but it has some restrictions to it, where __gshared is the equivalent to global variables in C.immutable variables are also not put in TLS.
Mar 10 2017
On Friday, 10 March 2017 at 21:32:05 UTC, sarn wrote:On Friday, 10 March 2017 at 19:24:29 UTC, bauss wrote:Thank you for yours replys but there is a tls directory even when I compile empty main..Mark your variables with __gshared. I would say shred, but it has some restrictions to it, where __gshared is the equivalent to global variables in C.immutable variables are also not put in TLS.
Mar 13 2017
On 13.03.2017 14:35, M-exe wrote:On Friday, 10 March 2017 at 21:32:05 UTC, sarn wrote:It's very likely that there are TLS variables in druntime that are linked in. You can identify them by looking at the map file.On Friday, 10 March 2017 at 19:24:29 UTC, bauss wrote:Thank you for yours replys but there is a tls directory even when I compile empty main..Mark your variables with __gshared. I would say shred, but it has some restrictions to it, where __gshared is the equivalent to global variables in C.immutable variables are also not put in TLS.
Mar 13 2017
On Friday, 10 March 2017 at 06:41:46 UTC, M-exe wrote:I found that D is great language, but for my own reasons I'm trying to use it without TLS at all. Can the TLS directory be avoided? (compiling on windows)I don't know what you mean by the TLS directory, can you explain?I mean, can it avoided without losing GC and main language features?You could probably modify druntime so that it doesn't use any Thread-Local Storage, but Phobos uses it extensively, as global and static variables are put in TLS by default since D 2.030: https://dlang.org/migrate-to-shared.html Are you against emulated TLS also? If not, I have modified dmd, ldc, and druntime to use the same emulated TLS scheme Walter came up with for OS X, for my Android port: https://github.com/dlang/dmd/pull/3643 https://github.com/ldc-developers/ldc/pull/1447 https://github.com/dlang/druntime/pull/784 You may be able to use something similar on Windows, depending on how feasible such an emulated TLS scheme is there and if you want to dig into these details.
Mar 13 2017