Fix porting regressions.

Fix new build failures and test failures on Linux that were introduced
by the port to OS X.
This commit is contained in:
Jason Evans
2010-09-11 23:38:12 -07:00
parent 7e11b389aa
commit 8d7a94b275
3 changed files with 9 additions and 15 deletions

View File

@@ -70,16 +70,16 @@ extern __thread tcache_t *tcache_tls
JEMALLOC_ATTR(tls_model("initial-exec"));
# define TCACHE_GET() tcache_tls
# define TCACHE_SET(v) do { \
tcache_tls = (v); \
tcache_tls = (tcache_t *)(v); \
pthread_setspecific(tcache_tsd, (void *)(v)); \
} while (0)
#else
extern pthread_key_t tcache_tsd;
# define TCACHE_GET() ((tcache_t *)pthread_getspecific(tcache_tsd))
# define TCACHE_SET(v) do { \
pthread_setspecific(tcache_tsd, (void *)(v)); \
} while (0)
#endif
extern pthread_key_t tcache_tsd;
/*
* Number of tcache bins. There are nbins small-object bins, plus 0 or more