# POSIX header spec: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/threads.h.html # # Spec quotations relating to includes: # - "Inclusion of the header shall make symbols defined in the header visible." # # bits/pthreadoi.h brings in pthread_once_t # time.h brings in features.h # features.h required for Rust never type (no return) sys_includes = ["time.h"] include_guard = "_RELIBC_THREADS_H" language = "C" style = "tag" no_includes = true cpp_compat = true after_includes = """ #include // for PTHREAD_DESTRUCTOR_ITERATIONS from limits.h #include // for PTHREAD_ONCE_INIT from pthread.h #include // for pthread_t from sys/types.h #include // for pthread_{key|mutex|cond}_t from sys/types.h #ifndef __cplusplus #define thread_local _Thread_local #endif #define ONCE_FLAG_INIT PTHREAD_ONCE_INIT // once_flag == pthread_once_t """ [export.rename] "timespec" = "struct timespec" [enum] prefix_with_name = true