| Issue |
234066
|
| Summary |
[libc] Implement sigismember in signal
|
| Labels |
libc
|
| Assignees |
|
| Reporter |
amanmaurya92
|
### Summary
Implement the standard POSIX function `sigismember` in `<signal.h>`.
POSIX specification: https://pubs.opengroup.org/onlinepubs/9799919799/functions/sigismember.html
### Background & Context
`sigismember` tests whether a specified signal `signum` is a member of the signal set pointed to by `set`:
```c
int sigismember(const sigset_t *set, int signum);
```
Returns `1` if the signal is a member, `0` if not, and `-1` on error (setting `errno` to `EINVAL` if `signum` is invalid).
LLVM libc already provides the companion signal set functions in `libc/src/signal/`:
- `sigemptyset`
- `sigfillset`
- `sigaddset`
- `sigdelset`
`sigismember` is the remaining query function to complete the standard `sigset_t` manipulation family.
### Scope
- Implement `sigismember` in `libc/src/signal/sigismember.h` and `libc/src/signal/sigismember.cpp`.
- Declare `sigismember` in `libc/include/signal.yaml`.
- Register entrypoints across supported architectures in `entrypoints.txt`.
- Add unit tests in `libc/test/src/signal/`.
I would like to work on this issue.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs