Lines Matching defs:keys
63 // As gtest uses pthread keys, we can't allocate exactly PTHREAD_KEYS_MAX
64 // pthread keys, but We should be able to allocate at least this many keys.
66 std::vector<pthread_key_t> keys;
68 auto scope_guard = android::base::make_scope_guard([&keys] {
69 for (const auto& key : keys) {
78 keys.push_back(key);
82 for (int i = keys.size() - 1; i >= 0; --i) {
83 ASSERT_EQ(reinterpret_cast<void*>(i), pthread_getspecific(keys.back()));
84 pthread_key_t key = keys.back();
85 keys.pop_back();
91 std::vector<pthread_key_t> keys;
94 // Pthread keys are used by gtest, so PTHREAD_KEYS_MAX should
103 keys.push_back(key);
106 // Don't leak keys.
107 for (const auto& key : keys) {
110 keys.clear();
112 // We should have eventually reached the maximum number of keys and received