Lines Matching refs:keys
61 // As gtest uses pthread keys, we can't allocate exactly PTHREAD_KEYS_MAX
62 // pthread keys, but We should be able to allocate at least this many keys.
64 std::vector<pthread_key_t> keys;
66 auto scope_guard = make_scope_guard([&keys]{
67 for (const auto& key : keys) {
76 keys.push_back(key);
80 for (int i = keys.size() - 1; i >= 0; --i) {
81 ASSERT_EQ(reinterpret_cast<void*>(i), pthread_getspecific(keys.back()));
82 pthread_key_t key = keys.back();
83 keys.pop_back();
89 std::vector<pthread_key_t> keys;
92 // Pthread keys are used by gtest, so PTHREAD_KEYS_MAX should
101 keys.push_back(key);
104 // Don't leak keys.
105 for (const auto& key : keys) {
108 keys.clear();
110 // We should have eventually reached the maximum number of keys and received