ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libeio/xthread.h
(Generate patch)

Comparing libeio/xthread.h (file contents):
Revision 1.17 by root, Thu May 9 03:03:24 2013 UTC vs.
Revision 1.18 by root, Mon Sep 21 08:01:00 2015 UTC

166#define respipe_write(a,b,c) write ((a), (b), (c)) 166#define respipe_write(a,b,c) write ((a), (b), (c))
167#define respipe_close(a) close ((a)) 167#define respipe_close(a) close ((a))
168 168
169#endif 169#endif
170 170
171#if __linux && __GNUC__ >= 4 && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 3 && 0 /* also check arch */
172/* __thread has little to no advantage over pthread_* in most configurations, so this is not used */
173# define X_TLS_DECLARE(varname) __thread void *varname
174# define X_TLS_INIT(varname)
175# define X_TLS_SET(varname,value) varname = (value)
176# define X_TLS_GET(varname) varname
177#else
178# define X_TLS_DECLARE(varname) pthread_key_t varname
179# define X_TLS_INIT(varname) do { if (pthread_key_create (&(varname), 0)) abort (); } while (0)
180# define X_TLS_SET(varname,value) pthread_setspecific (varname, (value))
181# define X_TLS_GET(varname) pthread_getspecific (varname)
171#endif 182#endif
172 183
184#endif
185

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines