MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / str_alloc_key

Function str_alloc_key

examples/libc/ex4.c:75–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73/* Function to allocate the key for str_alloc thread-specific data. */
74
75static void str_alloc_key(void)
76{
77 pthread_key_create(&str_key, str_alloc_destroy_accu);
78 printf("Thread %lx: allocated key %d\n", pthread_self(), str_key);
79}
80
81/* Function to free the buffer when the thread exits. */
82/* Called only when the thread-specific data is not NULL. */

Callers

nothing calls this directly

Calls 3

pthread_key_createFunction · 0.85
pthread_selfFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected