Commit 5df3ac3b by Dave MacLachlan Committed by Copybara-Service

Add note about using `CurrentThreadIdentityIfPresent()` on darwin based platforms.

PiperOrigin-RevId: 515353041
Change-Id: I2c88022d50a3351f70d09a2d63020470889752d9
parent d5d287dc
......@@ -170,7 +170,10 @@ struct ThreadIdentity {
//
// Does not malloc(*), and is async-signal safe.
// [*] Technically pthread_setspecific() does malloc on first use; however this
// is handled internally within tcmalloc's initialization already.
// is handled internally within tcmalloc's initialization already. Note that
// darwin does *not* use tcmalloc, so this can catch you if using MallocHooks
// on Apple platforms. Whatever function is calling your MallocHooks will need
// to watch for recursion on Apple platforms.
//
// New ThreadIdentity objects can be constructed and associated with a thread
// by calling GetOrCreateCurrentThreadIdentity() in per-thread-sem.h.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment