[PATCH] D31474: Update suspended threads info to be compatible with darwin

Aleksey Shlyapnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 17 10:52:51 PDT 2017


alekseyshl accepted this revision.
alekseyshl added a comment.
This revision is now accepted and ready to land.

Looks much better, thank you!



================
Comment at: lib/sanitizer_common/sanitizer_stoptheworld.h:39
+  virtual uptr RegisterCount() const = 0;
+  virtual uptr thread_count() const = 0;
+  virtual bool ContainsTid(tid_t thread_id) const = 0;
----------------
Please rename it to ThreadCount.


================
Comment at: lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc:518
+
+// The buffer in GetRegistersAndSP should be at least this big.
+uptr SuspendedThreadsListLinux::thread_count() const {
----------------
Remove this comment.


================
Comment at: lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc:521
+  return thread_ids_.size();
+}
+bool SuspendedThreadsListLinux::ContainsTid(tid_t thread_id) const {
----------------
Add empty line to separate functions.


================
Comment at: lib/sanitizer_common/sanitizer_stoptheworld_mac.cc:55
+
+// The buffer in GetRegistersAndSP should be at least this big.
+uptr SuspendedThreadsListMac::thread_count() const { return threads_.size(); }
----------------
Remove this comment.


================
Comment at: lib/sanitizer_common/sanitizer_stoptheworld_mac.cc:56
+// The buffer in GetRegistersAndSP should be at least this big.
+uptr SuspendedThreadsListMac::thread_count() const { return threads_.size(); }
+bool SuspendedThreadsListMac::ContainsTid(tid_t thread_id) const {
----------------
uptr SuspendedThreadsListMac::thread_count() const {
  return threads_.size();
}

and add an empty line between functions.


https://reviews.llvm.org/D31474





More information about the llvm-commits mailing list