[libc-commits] [PATCH] D74949: [libc] Create abort and _Exit

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Mar 4 09:00:30 PST 2020


sivachandra added a comment.

Just a few comments on comments. But, overall LGTM.



================
Comment at: libc/src/stdlib/abort.cpp:18
+void LLVM_LIBC_ENTRYPOINT(abort)() {
+  // TODO: When sigprocmask and sigaction land:
+  // Unblock SIGABRT, raise it, change its action to SIGDFL, raise it again.
----------------
Do you need `sigaction` also?


================
Comment at: libc/src/stdlib/abort.cpp:19
+  // TODO: When sigprocmask and sigaction land:
+  // Unblock SIGABRT, raise it, change its action to SIGDFL, raise it again.
+  // TODO: When C11 threads land:
----------------
I think you mean `SIG_DFL`?


================
Comment at: libc/src/stdlib/abort.cpp:21
+  // TODO: When C11 threads land:
+  // Aquire recursive mutex (SIGABRT handler could call abort)
+  __llvm_libc::raise(SIGABRT);
----------------
I am being pedantic but I think it is important to leave a more detailed comment here: I think I understand why we need a recursive mutex, but can you also explicitly detail in the comment why a recursive mutex et al is required.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74949/new/

https://reviews.llvm.org/D74949





More information about the libc-commits mailing list