* Can TLS be implemented switching from MAP_SHARED to MAP_PRIVATE a page reserved for TLS variables ??
@ 2020-04-06 23:57 William Tambe
2020-04-07 0:01 ` Godmar Back
2020-04-07 9:11 ` Florian Weimer
0 siblings, 2 replies; 3+ messages in thread
From: William Tambe @ 2020-04-06 23:57 UTC (permalink / raw)
To: William Tambe via Libc-help
Can TLS be implemented switching from MAP_SHARED to MAP_PRIVATE a page
reserved for TLS variables ?
Switching such a page from MAP_SHARED to MAP_PRIVATE would effectively
make it local to that thread.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Can TLS be implemented switching from MAP_SHARED to MAP_PRIVATE a page reserved for TLS variables ??
2020-04-06 23:57 Can TLS be implemented switching from MAP_SHARED to MAP_PRIVATE a page reserved for TLS variables ?? William Tambe
@ 2020-04-07 0:01 ` Godmar Back
2020-04-07 9:11 ` Florian Weimer
1 sibling, 0 replies; 3+ messages in thread
From: Godmar Back @ 2020-04-07 0:01 UTC (permalink / raw)
To: William Tambe; +Cc: William Tambe via Libc-help
On Mon, Apr 6, 2020 at 7:57 PM William Tambe via Libc-help
<libc-help@sourceware.org> wrote:
>
> Can TLS be implemented switching from MAP_SHARED to MAP_PRIVATE a page
> reserved for TLS variables ?
>
> Switching such a page from MAP_SHARED to MAP_PRIVATE would effectively
> make it local to that thread.
You're confusing threads and processes.
MAP_PRIVATE means a process-private mapping, not a thread-private mapping.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Can TLS be implemented switching from MAP_SHARED to MAP_PRIVATE a page reserved for TLS variables ??
2020-04-06 23:57 Can TLS be implemented switching from MAP_SHARED to MAP_PRIVATE a page reserved for TLS variables ?? William Tambe
2020-04-07 0:01 ` Godmar Back
@ 2020-04-07 9:11 ` Florian Weimer
1 sibling, 0 replies; 3+ messages in thread
From: Florian Weimer @ 2020-04-07 9:11 UTC (permalink / raw)
To: William Tambe via Libc-help
* William Tambe via Libc-help:
> Can TLS be implemented switching from MAP_SHARED to MAP_PRIVATE a page
> reserved for TLS variables ?
Backing storage for some TLS variables will still be allocated using
malloc, so this has only limited effect in any case.
> Switching such a page from MAP_SHARED to MAP_PRIVATE would effectively
> make it local to that thread.
NPTL depends on the TCB be accessible across different threads, so this
is not possible.
C makes cross-thread access implementation-defined, but I expect that
quite a few programs expect it to work, so you may have to support is an
extension.
Thanks,
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-07 9:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-06 23:57 Can TLS be implemented switching from MAP_SHARED to MAP_PRIVATE a page reserved for TLS variables ?? William Tambe
2020-04-07 0:01 ` Godmar Back
2020-04-07 9:11 ` Florian Weimer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).