thr_keycreate() は、プロセス内のスレッド固有データを識別するためのキーを割り当てます。
#include <thread.h> int thr_keycreate(thread_key_t *keyp, void (*destructor) (void *value));