[libc-commits] [PATCH] D75026: [libc] Add sigprocmask

Alex Brachet via Phabricator via libc-commits libc-commits at lists.llvm.org
Sun Feb 23 13:56:10 PST 2020


abrachet created this revision.
abrachet added reviewers: sivachandra, MaskRay, gchatelet.
Herald added subscribers: tschuett, mgorny.
abrachet marked 3 inline comments as done.
abrachet added inline comments.


================
Comment at: libc/include/signal.h.def:14-17
+#define __need_size_t
+#include <stddef.h>
 
 %%include_file(${platform_signal})
----------------
I need to get <linux/signal.h> included first now because the functions take `sigset_t *`. I couldn't figure out a clean way to do this but I'm pretty sure this isn't it.


================
Comment at: libc/spec/posix.td:1-5
+def SigSetType : NamedType<"sigset_t">;
+def SigSetPtrType : PtrType<SigSetType>;
+def ConstSigSetPtrType : ConstType<SigSetPtrType>;
+def RestrictSigSetType : RestrictedPtrType<SigSetType>;
+def ConstRestrictSigSetType : ConstType<RestrictSigSetType>;
----------------
Perhaps not where these should go?


================
Comment at: libc/test/src/signal/CMakeLists.txt:23-24
     signal_h
+    sigprocmask
+    __errno_location
+    signal_test
----------------
@sivachandra, I'm not sure how `add_header_library` is supposed to work, but I needed to add these to use `signal_test` even though it already depends on `sigprocmask` and `__errno_location`.


This patch adds `sigprocmask`, `sigemptyset` and `sigaddset`


https://reviews.llvm.org/D75026

Files:
  libc/config/linux/api.td
  libc/include/signal.h.def
  libc/spec/posix.td
  libc/src/signal/linux/CMakeLists.txt
  libc/src/signal/linux/sigaddset.cpp
  libc/src/signal/linux/sigemptyset.cpp
  libc/src/signal/linux/signal.h
  libc/src/signal/linux/sigprocmask.cpp
  libc/src/signal/sigaddset.h
  libc/src/signal/sigemptyset.h
  libc/src/signal/sigprocmask.h
  libc/test/src/signal/CMakeLists.txt
  libc/test/src/signal/SignalTest.h
  libc/test/src/signal/raise_test.cpp
  libc/test/src/signal/sigprocmask_test.cpp
  libc/utils/UnitTest/Test.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75026.246125.patch
Type: text/x-patch
Size: 14596 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20200223/3086281a/attachment-0001.bin>


More information about the libc-commits mailing list