[PATCH] D36385: [asan] Refactor thread creation bookkeeping
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 8 13:39:32 PDT 2017
vitalybuka added inline comments.
================
Comment at: lib/asan/asan_thread.h:71
+ // Should be called from the thread itself when called with default zeros.
+ void Init(uptr stack_bottom = 0, uptr stack_size = 0);
thread_return_t ThreadStart(tid_t os_id,
----------------
In common code.
```
struct Options; // Probably don't need to define at all and pass null pointer.
void Init(const Options* options = nullptr) {
...
}
```
in fuchsia code:
```
struct AsanThread::Options {
uptr stack_bottom;
uptr stack_size;
};
void AsanThread::SetThreadStackAndTls(const Options* options) {
...
// use options.stack_bottom and options.stack_size
}
```
https://reviews.llvm.org/D36385
More information about the llvm-commits
mailing list