[PATCH] D31774: [sanitizer] Introduce tid_t as a typedef for OS-provided thread IDs

Francis Ricci via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 6 11:09:37 PDT 2017


fjricci accepted this revision.
fjricci added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lib/sanitizer_common/sanitizer_stoptheworld.h:21
 namespace __sanitizer {
-typedef int SuspendedThreadID;
 
----------------
kubamracek wrote:
> fjricci wrote:
> > Will it be problematic to move `SuspendedThreadID` from `int` to `uptr` on Linux?
> I don't see any problems besides using a little bit more space in SuspendedThreadsList below.
> 
> I guess we could #ifdef `tid_t` to `int`/`pid_t` on Linux, because that's what `gettid` returns.
I also wasn't sure if we ever used something like `-1` for an error condition, but it doesn't appear so. I don't have any objection to `uptr`, since it seems that most of the code uses that anyway.


Repository:
  rL LLVM

https://reviews.llvm.org/D31774





More information about the llvm-commits mailing list