| 3566 | } |
| 3567 | |
| 3568 | void platformInit() { |
| 3569 | #ifdef WIN32 |
| 3570 | _set_FMA3_enable( |
| 3571 | 0); // Workaround for VS 2013 code generation bug. See |
| 3572 | // https://connect.microsoft.com/VisualStudio/feedback/details/811093/visual-studio-2013-rtm-c-x64-code-generation-bug-for-avx2-instructions |
| 3573 | #endif |
| 3574 | #ifdef __linux__ |
| 3575 | struct timespec ts; |
| 3576 | if (clock_gettime(CLOCK_MONOTONIC, &ts) != 0) { |
| 3577 | criticalError(FDB_EXIT_ERROR, |
| 3578 | "MonotonicTimeUnavailable", |
| 3579 | "clock_gettime(CLOCK_MONOTONIC, ...) returned an error. Check your kernel and glibc versions."); |
| 3580 | } |
| 3581 | #endif |
| 3582 | } |
| 3583 | |
| 3584 | // The crashHandler function is registered to handle signals before the process terminates. |
| 3585 | // Basic information about the crash is printed/traced, and stdout and trace events are flushed. |