[libc-commits] [libc] [libc] Add sys/ucontext.h header (PR #194329)
Pavel Labath via libc-commits
libc-commits at lists.llvm.org
Mon Apr 27 05:34:34 PDT 2026
labath wrote:
It's probably fine. I don't really have any additional background knowledge here (I didn't even know that there are two `ucontext.h`s). Separating the ucontext_t type (which is the really useful part) from the (deprecated) context manipulation functions sounds kinda nice, but given that this is all nonstandard, I don't see why it would have to be implemented in this way.
You say POSIX provided sys/ucontext.h as an alias for ucontext.h. I haven't found that reference, but if that's the case, then what you've done makes sense here.
It also occurred to me that separating the type from the functions could be useful for complying with the latest standard (which moved the ucontext_t definition to signal.h). However, we already have them separated (ucontext_t is defined in `include/llvm-libc-types/x86_64/ucontext_t.h`), which means there won't be an issue with cluttering signal.h with deprecated functions it should not provide.
https://github.com/llvm/llvm-project/pull/194329
More information about the libc-commits
mailing list