Lines Matching full:keys
17 static pthread_key_t keys[N_KEY]; variable
43 zassert_ok(pthread_setspecific(keys[i], value), "pthread_setspecific failed"); in thread_func()
44 zassert_equal(pthread_getspecific(keys[i]), value, in thread_func()
59 zassert_ok(pthread_key_create(&keys[i], NULL), in make_keys()
60 "insufficient memory to create keys"); in make_keys()
74 * multiple keys.
102 zassert_ok(pthread_once(&keys_once, make_keys), "attempt to create keys failed"); in ZTEST()
104 /* Single thread associates its value with different keys */ in ZTEST()
112 zassert_ok(pthread_key_delete(keys[i]), "attempt to delete keys[%d] failed", i); in ZTEST()
130 pthread_key_t keys[CONFIG_POSIX_THREAD_KEYS_MAX]; in ZTEST() local
132 for (size_t i = 0; i < ARRAY_SIZE(keys); ++i) { in ZTEST()
133 zassert_ok(pthread_key_create(&keys[i], NULL), "failed to create key %zu", i); in ZTEST()
136 key = keys[j]; in ZTEST()
137 zassert_ok(pthread_key_delete(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()
142 for (size_t i = 0; i < ARRAY_SIZE(keys); ++i) { in ZTEST()
143 zassert_ok(pthread_key_delete(keys[i]), "failed to delete key %zu", i); in ZTEST()
174 printk("first thread allocated %d keys", alloc_count_t0); in ZTEST()
179 printk("second thread allocated %d keys", alloc_count_t1); in ZTEST()