| 73 | /* Function to allocate the key for str_alloc thread-specific data. */ |
| 74 | |
| 75 | static 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. */ |
nothing calls this directly
no test coverage detected