[PATCH] D31474: Update suspended threads info to be compatible with darwin
Aleksey Shlyapnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 12 09:18:40 PDT 2017
alekseyshl added a comment.
Should we commit and merge with https://reviews.llvm.org/D31774 first?
================
Comment at: lib/sanitizer_common/sanitizer_stoptheworld.h:30
+
+ SuspendedThreadInfo GetThread(uptr index) const {
+ CHECK_LT(index, threads_.size());
----------------
const SuspendedThreadInfo& GetThread
================
Comment at: lib/sanitizer_common/sanitizer_stoptheworld.h:39
+ uptr thread_count() const { return threads_.size(); }
+ bool Contains(SuspendedThreadInfo const &info) const {
+ for (uptr i = 0; i < threads_.size(); i++) {
----------------
I think we should stick to Contains(SuspendedThreadID thread_id), it's semantics is to check whether the thread info for the given thread id is already appended to the list, not that the list contains the same info. Maybe even rename it to ContainsTid.
https://reviews.llvm.org/D31474
More information about the llvm-commits
mailing list