diff options
author | David Goldblatt <davidgoldblatt@fb.com> | 2017-03-29 00:30:54 (GMT) |
---|---|---|
committer | David Goldblatt <davidtgoldblatt@gmail.com> | 2017-04-07 21:10:27 (GMT) |
commit | 0a0fcd3e6a0816f0a56fa852416d0ece861c0abb (patch) | |
tree | 49b3c934dd8308e7c3bf31692184ef72bb1e8a0d /src/tsd.c | |
parent | 36bd90b96212772f1adbd421a6b091b542278995 (diff) | |
download | jemalloc-0a0fcd3e6a0816f0a56fa852416d0ece861c0abb.zip jemalloc-0a0fcd3e6a0816f0a56fa852416d0ece861c0abb.tar.gz jemalloc-0a0fcd3e6a0816f0a56fa852416d0ece861c0abb.tar.bz2 |
Add hooking functionality
This allows us to hook chosen functions and do interesting things there (in
particular: reentrancy checking).
Diffstat (limited to 'src/tsd.c')
-rw-r--r-- | src/tsd.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -149,6 +149,15 @@ _tls_callback(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { return true; } +/* + * We need to be able to say "read" here (in the "pragma section"), but have + * hooked "read". We won't read for the rest of the file, so we can get away + * with unhooking. + */ +#ifdef read +# undef read +#endif + #ifdef _MSC_VER # ifdef _M_IX86 # pragma comment(linker, "/INCLUDE:__tls_used") |