MCPcopy Create free account
hub / github.com/alibaba/PhotonLibOS / thread_key_delete

Function thread_key_delete

thread/thread-key.cpp:144–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144int thread_key_delete(thread_key_t key) {
145 int result = EINVAL;
146 if (key < THREAD_KEYS_MAX) {
147 uint64_t seq = thread_keys[key].seq;
148 if (!key_unused(seq) && __sync_bool_compare_and_swap(&thread_keys[key].seq, seq, seq + 1))
149 /* We deleted a valid key by making the seq even again */
150 result = 0;
151 }
152 return result;
153}
154
155void deallocate_tls(void** tls_) {
156 size_t round = 0;

Callers 2

st_key_createFunction · 0.85
TESTFunction · 0.85

Calls 1

key_unusedFunction · 0.85

Tested by 1

TESTFunction · 0.68