Make ThreadLocalBuffer a class rather than a macro.

Bug: 19995392
Change-Id: I497c512648fbe66257da3fb3bcd5c9911f983705
This commit is contained in:
Elliott Hughes
2015-03-31 10:56:58 -07:00
parent 611fd2cc91
commit 6170693e28
10 changed files with 86 additions and 90 deletions

View File

@@ -68,8 +68,7 @@ TEST(pthread, pthread_key_many_distinct) {
for (int i = 0; i < nkeys; ++i) {
pthread_key_t key;
// If this fails, it's likely that GLOBAL_INIT_THREAD_LOCAL_BUFFER_COUNT is
// wrong.
// If this fails, it's likely that LIBC_PTHREAD_KEY_RESERVED_COUNT is wrong.
ASSERT_EQ(0, pthread_key_create(&key, NULL)) << i << " of " << nkeys;
keys.push_back(key);
ASSERT_EQ(0, pthread_setspecific(key, reinterpret_cast<void*>(i)));