32 lines
1.0 KiB
TOML
32 lines
1.0 KiB
TOML
# POSIX header spec: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/threads.h.html
|
|
#
|
|
# Spec quotations relating to includes:
|
|
# - "Inclusion of the <threads.h> header shall make symbols defined in the header <time.h> 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 <bits/limits/ptdi.h> // for PTHREAD_DESTRUCTOR_ITERATIONS from limits.h
|
|
#include <bits/pthreadoi.h> // for PTHREAD_ONCE_INIT from pthread.h
|
|
#include <bits/pthread-t.h> // for pthread_t from sys/types.h
|
|
#include <bits/threads.h> // 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
|