Single-address space, no processes?

Jamie Lokier jamie at shareable.org
Fri Jan 8 02:32:43 AWST 2016


Matt Johnston wrote:
> It mightn't be necessary to pass pointers around everywhere if
> ses/svr_ses/cli_ses could be thread-local pointer variables - how widely
> supported is thread-local storage?

If you can get a "current thread id" or set one "thread-local value", you can
make thread-local variables in portable C using macros without compiler
support.

It's not as fast as compiler supported thread-local storage, but it's portable
other than function to get the id, and provided you can set the value, it's
not necessarily slow.

Best,
-- Jamie


More information about the Dropbear mailing list