Files
RedBear-OS/src/header/bits_pthread/cbindgen.toml
T
2026-07-04 17:16:08 +01:00

41 lines
1.0 KiB
TOML

# POSIX header spec: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_types.h.html
#
# These types are split out to prevent importing all of sys/types.h into other headers.
#
# POSIX headers that require them:
# - aio.h (pthread_attr_t only)
# - pthread.h (all of them)
# - signal.h (pthread_t and pthread_attr_t only)
# - sys/types.h (where they should be defined)
include_guard = "_RELIBC_BITS_PTHREAD_H"
language = "C"
style = "type"
no_includes = true
cpp_compat = true
# TODO split out PTHREAD_ONCE_INIT for threads.h
after_includes = """
#include <bits/pthread-t.h> // for pthread_t from sys/types.h
#include <bits/pthreadattr-t.h> // for pthread_attr_t from sys/types.h
#define PTHREAD_ONCE_INIT ((pthread_once_t){0})
"""
[export]
include = [
"pthread_rwlockattr_t",
"pthread_rwlock_t",
"pthread_barrier_t",
"pthread_barrierattr_t",
"pthread_mutex_t",
"pthread_mutexattr_t",
"pthread_condattr_t",
"pthread_cond_t",
"pthread_spinlock_t",
"pthread_once_t",
"pthread_key_t",
]
[enum]
prefix_with_name = true