split out pthread types for threads header
This commit is contained in:
@@ -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
|
||||
@@ -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.
|
||||
Reference in New Issue
Block a user