split out pthread types for threads header

This commit is contained in:
auronandace
2026-07-06 16:41:09 +01:00
parent 52bb3bbfe3
commit d7859174b7
11 changed files with 134 additions and 46 deletions
+18
View File
@@ -0,0 +1,18 @@
# POSIX header spec: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/pthread.h.html
#
# This type is split out to avoid importing all of pthread.h into other headers.
#
# POSIX headers that require PTHREAD_ONCE_INIT:
# - pthread.h (where it should be defined)
# - threads.h (for ONCE_FLAG_INIT)
include_guard = "_RELIBC_BITS_PTHREAD_ONCE_INIT_H"
after_includes = """
#include <bits/pthreadonce-t.h> // for pthread_once_t from sys/types.h
#define PTHREAD_ONCE_INIT ((pthread_once_t){0})
"""
language = "C"
no_includes = true
cpp_compat = true
[enum]
prefix_with_name = true
+5
View File
@@ -0,0 +1,5 @@
//! `PTHREAD_ONCE_INIT` for `pthread.h` implementation.
//!
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/pthread.h.html>.
//!
//! Implemented via C define in cbindgen.