On 12/06/2011 12:43 PM, Andreas Färber wrote:
Am 06.12.2011 12:01, schrieb Stefan Hajnoczi:
From: Jan Kiszka<jan.kis...@siemens.com>
get_tls() can serve as a lvalue as well, so 'get' might be confusing.
Note that this does not work for POSIX pthread_getspecific(), which
we'll need to support at some point in time, so I don't think this is a
terribly good idea.
I already posted the code for pthread_getspecific(), but it didn't work
on OpenBSD.
The idea was to reserve a single pthread key and allocate a whole block
of memory. Then get_tls can use pthread_getspecific() and add an offset
within the block of memory. The reason is that with many allocated keys
pthread_getspecific() becomes slower.
Paolo