| 41 | } |
| 42 | |
| 43 | void SetThreadName(std::thread &thread, const std::string &name) { |
| 44 | #if LIBFUZZER_LINUX || LIBFUZZER_FREEBSD |
| 45 | (void)pthread_setname_np(thread.native_handle(), name.c_str()); |
| 46 | #elif LIBFUZZER_NETBSD |
| 47 | (void)pthread_setname_np(thread.native_handle(), "%s", const_cast<char *>(name.c_str())); |
| 48 | #endif |
| 49 | } |
| 50 | |
| 51 | } // namespace fuzzer |
| 52 |
no test coverage detected