[IE][VPU][Watchdog]: Reduce CPU usage for idle VPU (#2030)

This commit is contained in:
Dmitry Kurtaev 2020-09-03 16:49:48 +03:00 committed by GitHub
parent efad27d68c
commit 37a7bbc08c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,9 +110,12 @@ WatchdogImpl::WatchdogImpl() {
if (rc != 0) {
throw std::runtime_error("failed to set condition variable clock. rc: " + std::to_string(rc));
}
rc = pthread_cond_init(&wakeUpPingThread, &attr);
#else
rc = pthread_cond_init(&wakeUpPingThread, NULL);
#endif // !(defined(__APPLE__) || defined(_WIN32))
rc = pthread_cond_init(&wakeUpPingThread, NULL);
if (rc != 0) {
throw std::runtime_error("failed to initialize \"wakeUpPingThread\" condition variable. rc: " + std::to_string(rc));
}