Lines Matching full:key
16 static pthread_key_t key; variable
28 zassert_ok(pthread_setspecific(key, value), "pthread_setspecific failed"); in thread_top()
29 zassert_equal(pthread_getspecific(key), value, "set and retrieved values are different"); in thread_top()
53 zassert_ok(pthread_key_create(&key, NULL), "insufficient memory to create key"); in make_key()
68 * create a key via pthread_key_create() API. It then sets the
69 * thread-specific value to the key using pthread_setspecific() and
71 * are equal. It then deletes the key using pthread_key_delete().
73 * using the same key and the other with a single thread using
77 ZTEST(key, test_key_1toN_thread) in ZTEST() argument
82 zassert_ok(pthread_once(&key_once, make_key), "attempt to create key failed"); in ZTEST()
84 /* Different threads set different values to same key */ in ZTEST()
95 zassert_ok(pthread_key_delete(key), "attempt to delete key failed"); in ZTEST()
98 ZTEST(key, test_key_Nto1_thread) in ZTEST() argument
116 ZTEST(key, test_key_resource_leak) in ZTEST() argument
118 pthread_key_t key; in ZTEST() local
121 zassert_ok(pthread_key_create(&key, NULL), "failed to create key %zu", i); in ZTEST()
122 zassert_ok(pthread_key_delete(key), "failed to delete key %zu", i); in ZTEST()
126 ZTEST(key, test_correct_key_is_deleted) in ZTEST() argument
128 pthread_key_t key; in ZTEST() local
133 zassert_ok(pthread_key_create(&keys[i], NULL), "failed to create key %zu", i); in ZTEST()
136 key = keys[j]; in ZTEST()
138 zassert_ok(pthread_key_create(&keys[j], NULL), "failed to create key %zu", j); in ZTEST()
140 zassert_equal(key, keys[j], "deleted key %x instead of key %x", keys[j], key); in ZTEST()
143 zassert_ok(pthread_key_delete(keys[i]), "failed to delete key %zu", i); in ZTEST()
153 pthread_key_t key; in setspecific_thread() local
155 zassert_ok(pthread_key_create(&key, NULL), "failed to create key"); in setspecific_thread()
156 if (pthread_setspecific(key, &value) == ENOMEM) { in setspecific_thread()
165 ZTEST(key, test_thread_specific_data_deallocation) in ZTEST() argument
195 ZTEST_SUITE(key, NULL, NULL, before, NULL, NULL);