[lttng-dev] liburcu patch for compilers without __thread support

Marek Vavruša marek.vavrusa at nic.cz
Mon Jan 30 10:59:36 EST 2012


Hello,

we're using liburcu for our DNS server. It's really clever, but we
needed to get it running under NetBSD/OpenBSD and OS X.
Since compilers on those platform don't have support for __thread
keyword, I have made a patch that detects such a compiler
and uses compatibility implementation with
pthread_getspecific()/pthread_setspecific(). I have attempted to make
it as least intrusive
as possible. TLS variables are now declared/defined with a set of
macros in urcu/tls-compat.h

The patch is against the latest release tag v0.6.7 (git format-patch),
but should work with latest git head save for configure.ac
Please let me know what you think and how could we incorporate it to upstream.

Cheers,
Marek

--
 Marek Vavruša                      Knot DNS
 CZ.NIC Labs          http://www.knot-dns.cz
 -------------------------------------------
 Americká 23, 120 00 Praha 2, Czech Republic
 WWW: http://labs.nic.cz   http://www.nic.cz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compat_patch_tls.patch
Type: application/octet-stream
Size: 50056 bytes
Desc: not available
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20120130/02f6dd54/attachment-0001.obj>


More information about the lttng-dev mailing list