Home
last modified time | relevance | path

Searched refs:key (Results 1 – 25 of 59) sorted by relevance

123

/bionic/libc/bionic/
Dpthread_key.cpp66 static inline bool KeyInValidRange(pthread_key_t key) { in KeyInValidRange() argument
69 return (key < (KEY_VALID_FLAG | BIONIC_PTHREAD_KEY_COUNT)); in KeyInValidRange()
124 int pthread_key_create(pthread_key_t* key, void (*key_destructor)(void*)) { in pthread_key_create() argument
130 *key = i | KEY_VALID_FLAG; in pthread_key_create()
143 int pthread_key_delete(pthread_key_t key) { in pthread_key_delete() argument
144 if (__predict_false(!KeyInValidRange(key))) { in pthread_key_delete()
147 key &= ~KEY_VALID_FLAG; in pthread_key_delete()
149 uintptr_t seq = atomic_load_explicit(&key_map[key].seq, memory_order_relaxed); in pthread_key_delete()
151 if (atomic_compare_exchange_strong(&key_map[key].seq, &seq, seq + SEQ_INCREMENT_STEP)) { in pthread_key_delete()
159 void* pthread_getspecific(pthread_key_t key) { in pthread_getspecific() argument
[all …]
Dsystem_property_set.cpp276 int __system_property_set(const char* key, const char* value) { in __system_property_set() argument
277 if (key == nullptr) return -1; in __system_property_set()
286 if (strlen(key) >= PROP_NAME_MAX) return -1; in __system_property_set()
292 strlcpy(msg.name, key, sizeof msg.name); in __system_property_set()
298 if (strlen(value) >= PROP_VALUE_MAX && strncmp(key, "ro.", 3) != 0) return -1; in __system_property_set()
300 PropertyServiceConnection connection(key); in __system_property_set()
304 "Unable to set property \"%s\" to \"%s\": connection failed: %m", key, in __system_property_set()
310 if (!writer.WriteUint32(PROP_MSG_SETPROP2).WriteString(key).WriteString(value).Send()) { in __system_property_set()
313 "Unable to set property \"%s\" to \"%s\": write failed: %m", key, in __system_property_set()
322 "Unable to set property \"%s\" to \"%s\": recv failed: %m", key, value); in __system_property_set()
[all …]
Dsys_shm.cpp67 int shmget(key_t key, size_t size, int flags) { in shmget() argument
69 return syscall(SYS_shmget, key, size, flags); in shmget()
71 return syscall(SYS_ipc, SHMGET, key, size, flags, 0, 0); in shmget()
Dsys_msg.cpp46 int msgget(key_t key, int flags) { in msgget() argument
48 return syscall(SYS_msgget, key, flags); in msgget()
50 return syscall(SYS_ipc, MSGGET, key, flags, 0, 0, 0); in msgget()
Dsys_sem.cpp51 int semget(key_t key, int n, int flags) { in semget() argument
53 return syscall(SYS_semget, key, n, flags); in semget()
55 return syscall(SYS_ipc, SEMGET, key, n, flags, 0, 0); in semget()
Dtdestroy.cpp21 char* key; member
39 (*destroy_func)(root_node->key); in tdestroy()
/bionic/tests/
Dsys_hwprobe_test.cpp100 riscv_hwprobe probes[] = {{.key = RISCV_HWPROBE_KEY_IMA_EXT_0}, in TEST()
101 {.key = RISCV_HWPROBE_KEY_CPUPERF_0}}; in TEST()
103 EXPECT_EQ(RISCV_HWPROBE_KEY_IMA_EXT_0, probes[0].key); in TEST()
111 EXPECT_EQ(RISCV_HWPROBE_KEY_CPUPERF_0, probes[1].key); in TEST()
120 riscv_hwprobe probes_vdso[] = {{.key = RISCV_HWPROBE_KEY_IMA_EXT_0}, in TEST()
121 {.key = RISCV_HWPROBE_KEY_CPUPERF_0}}; in TEST()
124 riscv_hwprobe probes_syscall[] = {{.key = RISCV_HWPROBE_KEY_IMA_EXT_0}, in TEST()
125 {.key = RISCV_HWPROBE_KEY_CPUPERF_0}}; in TEST()
129 EXPECT_EQ(RISCV_HWPROBE_KEY_IMA_EXT_0, probes_syscall[0].key); in TEST()
130 EXPECT_EQ(probes_vdso[0].key, probes_syscall[0].key); in TEST()
[all …]
Dsearch_test.cpp221 ASSERT_STREQ(expected_key, reinterpret_cast<char*>(e->key)); in AssertEntry()
230 e = hsearch(ENTRY{.key = const_cast<char*>("a"), .data = const_cast<char*>("A")}, ENTER); in TEST()
232 e = hsearch(ENTRY{.key = const_cast<char*>("aa"), .data = const_cast<char*>("B")}, ENTER); in TEST()
234 e = hsearch(ENTRY{.key = const_cast<char*>("aaa"), .data = const_cast<char*>("C")}, ENTER); in TEST()
238 e = hsearch(ENTRY{.key = const_cast<char*>("aaaa"), .data = nullptr}, FIND); in TEST()
242 e = hsearch(ENTRY{.key = const_cast<char*>("aa"), .data = nullptr}, FIND); in TEST()
246 e = hsearch(ENTRY{.key = const_cast<char*>("aa"), .data = const_cast<char*>("X")}, ENTER); in TEST()
251 e = hsearch(ENTRY{.key = const_cast<char*>("aa"), .data = nullptr}, FIND); in TEST()
254 e = hsearch(ENTRY{.key = const_cast<char*>("a"), .data = nullptr}, FIND); in TEST()
256 e = hsearch(ENTRY{.key = const_cast<char*>("aaa"), .data = nullptr}, FIND); in TEST()
[all …]
Dthreads_test.cpp462 tss_t key; in TEST()
463 ASSERT_EQ(thrd_success, tss_create(&key, nullptr)); in TEST()
464 tss_delete(key); in TEST()
473 tss_t key; in TEST()
474 ASSERT_EQ(thrd_success, tss_create(&key, dtor)); in TEST()
476 ASSERT_EQ(thrd_success, tss_set(key, strdup("hello"))); in TEST()
477 std::thread([&key] { in TEST()
478 ASSERT_EQ(thrd_success, tss_set(key, strdup("world"))); in TEST()
486 ASSERT_EQ(thrd_success, tss_set(key, strdup("hello"))); in TEST()
493 tss_delete(key); in TEST()
[all …]
Dsys_shm_test.cpp42 key_t key = ftok(dir.path, 1); in TEST() local
43 int id = shmget(key, 1234, IPC_CREAT|0666); in TEST()
Dpthread_test.cpp54 pthread_key_t key; in TEST() local
55 ASSERT_EQ(0, pthread_key_create(&key, nullptr)); in TEST()
56 ASSERT_EQ(0, pthread_key_delete(key)); in TEST()
58 ASSERT_EQ(EINVAL, pthread_key_delete(key)); in TEST()
78 for (const auto& key : keys) { in TEST() local
79 EXPECT_EQ(0, pthread_key_delete(key)); in TEST()
84 pthread_key_t key; in TEST() local
86 ASSERT_EQ(0, pthread_key_create(&key, nullptr)) << i << " of " << nkeys; in TEST()
87 keys.push_back(key); in TEST()
88 ASSERT_EQ(0, pthread_setspecific(key, reinterpret_cast<void*>(i))); in TEST()
[all …]
/bionic/benchmarks/
Dpthread_benchmark.cpp33 pthread_key_t key; in BM_pthread_getspecific() local
34 pthread_key_create(&key, nullptr); in BM_pthread_getspecific()
37 pthread_getspecific(key); in BM_pthread_getspecific()
40 pthread_key_delete(key); in BM_pthread_getspecific()
45 pthread_key_t key; in BM_pthread_setspecific() local
46 pthread_key_create(&key, nullptr); in BM_pthread_setspecific()
49 pthread_setspecific(key, nullptr); in BM_pthread_setspecific()
52 pthread_key_delete(key); in BM_pthread_setspecific()
220 pthread_key_t key; in BM_pthread_key_create() local
221 pthread_key_create(&key, nullptr); in BM_pthread_key_create()
[all …]
/bionic/libc/upstream-openbsd/lib/libc/stdlib/
Dtsearch.c18 char *key; member
28 char *key = (char *)vkey; in tsearch() local
36 if ((r = (*compar)(key, (*rootp)->key)) == 0) /* T2: */ in tsearch()
45 q->key = key; /* initialize new node */ in tsearch()
57 char *key = (char *)vkey; in tdelete() local
65 while ((cmp = (*compar)(key, (*rootp)->key)) != 0) { in tdelete()
Dlsearch.c42 lsearch(const void *key, void *base, size_t *nelp, size_t width, in lsearch() argument
45 void *element = lfind(key, base, nelp, width, compar); in lsearch()
52 element = memmove((char *)base + *nelp * width, key, width); in lsearch()
59 lfind(const void *key, const void *base, size_t *nelp, size_t width, in lfind() argument
66 if (!compar(key, element)) /* key found */ in lfind()
Dtfind.c17 char *key; member
26 char *key = (char *)vkey; in tfind() local
33 if ((r = (*compar)(key, (*rootp)->key)) == 0) /* T2: */ in tfind()
/bionic/libc/kernel/uapi/linux/
Dtls.h80 unsigned char key[TLS_CIPHER_AES_GCM_128_KEY_SIZE]; member
87 unsigned char key[TLS_CIPHER_AES_GCM_256_KEY_SIZE]; member
94 unsigned char key[TLS_CIPHER_AES_CCM_128_KEY_SIZE]; member
101 unsigned char key[TLS_CIPHER_CHACHA20_POLY1305_KEY_SIZE]; member
108 unsigned char key[TLS_CIPHER_SM4_GCM_KEY_SIZE]; member
115 unsigned char key[TLS_CIPHER_SM4_CCM_KEY_SIZE]; member
122 unsigned char key[TLS_CIPHER_ARIA_GCM_128_KEY_SIZE]; member
129 unsigned char key[TLS_CIPHER_ARIA_GCM_256_KEY_SIZE]; member
Dsed-opal.h49 __u8 key[OPAL_KEY_MAX]; member
55 struct opal_key key; member
93 struct opal_key key; member
98 struct opal_key key; member
103 struct opal_key key; member
114 struct opal_key key; member
147 struct opal_key key; member
Dagpgart.h57 int key; member
63 int key; member
67 int key; member
Dpr.h27 __u64 key; member
44 __u64 key; member
/bionic/libc/upstream-freebsd/lib/libc/stdlib/
Dhsearch_r.c50 if (entry->key == NULL) in hsearch_lookup_free()
83 hash = hsearch_hash(hsearch->offset_basis, item.key); in hsearch_r()
91 if (entry->key == NULL) in hsearch_r()
93 if (strcmp(entry->key, item.key) == 0) { in hsearch_r()
126 if (entry->key != NULL) { in hsearch_r()
128 entry->key); in hsearch_r()
/bionic/libc/upstream-netbsd/lib/libc/stdlib/
Dbsearch.c62 bsearch(const void *key, const void *base0, size_t nmemb, size_t size, in bsearch() argument
70 _DIAGASSERT(key != NULL); in bsearch()
76 cmp = (*compar)(key, p); in bsearch()
/bionic/libc/malloc_debug/
DPointerData.h71 std::size_t operator()(const FrameKeyType& key) const {
72 std::size_t cur_hash = key.frames[0];
74 size_t max_frames = (key.num_frames > 5) ? 5 : key.num_frames;
76 cur_hash ^= key.frames[i];
/bionic/apex/
DAndroid.bp27 name: "com.android.runtime.key",
63 key: "com.android.runtime.key",
/bionic/libc/dns/resolv/
Dres_cache.c1333 _cache_check_pending_request_locked( struct resolv_cache** cache, Entry* key, unsigned netid ) in _cache_check_pending_request_locked() argument
1338 if (*cache && key) { in _cache_check_pending_request_locked()
1342 if (ri->hash == key->hash) { in _cache_check_pending_request_locked()
1353 ri->hash = key->hash; in _cache_check_pending_request_locked()
1373 _cache_notify_waiting_tid_locked( struct resolv_cache* cache, Entry* key ) in _cache_notify_waiting_tid_locked() argument
1377 if (cache && key) { in _cache_notify_waiting_tid_locked()
1381 if (ri->hash == key->hash) { in _cache_notify_waiting_tid_locked()
1404 Entry key[1]; in _resolv_cache_query_failed() local
1407 if (!entry_init_key(key, query, querylen)) in _resolv_cache_query_failed()
1415 _cache_notify_waiting_tid_locked(cache, key); in _resolv_cache_query_failed()
[all …]
/bionic/benchmarks/linker_relocation/regen/
Ddump_relocs.py60 key = repr(cmdline)
61 if key in g_readelf_cache: return g_readelf_cache[key].splitlines()
63 g_readelf_cache[key] = out

123