Freebsd fix

This commit is contained in:
proller 2019-07-23 12:54:15 +03:00
parent 8e8ebf9c44
commit cb882d61bb

View File

@ -78,7 +78,13 @@ QueryProfilerBase<ProfilerImpl>::QueryProfilerBase(const Int32 thread_id, const
struct sigevent sev; struct sigevent sev;
sev.sigev_notify = SIGEV_THREAD_ID; sev.sigev_notify = SIGEV_THREAD_ID;
sev.sigev_signo = pause_signal; sev.sigev_signo = pause_signal;
#if defined(__FreeBSD__)
sev._sigev_un._threadid = thread_id;
#else
sev._sigev_un._tid = thread_id; sev._sigev_un._tid = thread_id;
#endif
if (timer_create(clock_type, &sev, &timer_id)) if (timer_create(clock_type, &sev, &timer_id))
throwFromErrno("Failed to create thread timer", ErrorCodes::CANNOT_CREATE_TIMER); throwFromErrno("Failed to create thread timer", ErrorCodes::CANNOT_CREATE_TIMER);