1570af302Sopenharmony_ci#include <threads.h> 2570af302Sopenharmony_ci#include <pthread.h> 3570af302Sopenharmony_ci 4570af302Sopenharmony_ciint tss_create(tss_t *tss, tss_dtor_t dtor) 5570af302Sopenharmony_ci{ 6570af302Sopenharmony_ci /* Different error returns are possible. C glues them together into 7570af302Sopenharmony_ci * just failure notification. Can't be optimized to a tail call, 8570af302Sopenharmony_ci * unless thrd_error equals EAGAIN. */ 9570af302Sopenharmony_ci return __pthread_key_create(tss, dtor) ? thrd_error : thrd_success; 10570af302Sopenharmony_ci} 11