/*
* Get notify_sock timeout, in ms.
- * -1: don't wait. 0: wait forever. >0: timeout, in ms.
+ * -1: wait forever. 0: don't wait. >0: timeout, in ms.
*/
static
long get_timeout(void)
}
/*
- * Return values: -1: don't wait. 0: wait forever. 1: timeout wait.
+ * Return values: -1: wait forever. 0: don't wait. 1: timeout wait.
*/
static
int get_constructor_timeout(struct timespec *constructor_timeout)
*/
ret = clock_gettime(CLOCK_REALTIME, constructor_timeout);
if (ret) {
- return -1;
+ /* Don't wait. */
+ return 0;
}
constructor_timeout->tv_sec += constructor_delay_ms / 1000UL;
constructor_timeout->tv_nsec +=
constructor_timeout->tv_sec++;
constructor_timeout->tv_nsec -= 1000000000UL;
}
+ /* Timeout wait (constructor_delay_ms). */
return 1;
}