version 1.21, 2016/05/25 05:37:12 |
version 1.22, 2016/06/30 21:37:29 |
|
|
|
|
#ifdef DEBUG |
#ifdef DEBUG |
if (log_level >= 3) |
if (log_level >= 3) |
clock_gettime(CLOCK_MONOTONIC, &ts0); |
clock_gettime(CLOCK_UPTIME, &ts0); |
#endif |
#endif |
revents = (f->state != FILE_ZOMB) ? |
revents = (f->state != FILE_ZOMB) ? |
f->ops->revents(f->arg, pfd) : 0; |
f->ops->revents(f->arg, pfd) : 0; |
|
|
f->ops->out(f->arg); |
f->ops->out(f->arg); |
#ifdef DEBUG |
#ifdef DEBUG |
if (log_level >= 3) { |
if (log_level >= 3) { |
clock_gettime(CLOCK_MONOTONIC, &ts1); |
clock_gettime(CLOCK_UPTIME, &ts1); |
us = 1000000L * (ts1.tv_sec - ts0.tv_sec); |
us = 1000000L * (ts1.tv_sec - ts0.tv_sec); |
us += (ts1.tv_nsec - ts0.tv_nsec) / 1000; |
us += (ts1.tv_nsec - ts0.tv_nsec) / 1000; |
if (log_level >= 4 || us >= 5000) { |
if (log_level >= 4 || us >= 5000) { |
|
|
* timeout (i.e -1). |
* timeout (i.e -1). |
*/ |
*/ |
#ifdef DEBUG |
#ifdef DEBUG |
clock_gettime(CLOCK_MONOTONIC, &sleepts); |
clock_gettime(CLOCK_UPTIME, &sleepts); |
file_utime += 1000000000LL * (sleepts.tv_sec - file_ts.tv_sec); |
file_utime += 1000000000LL * (sleepts.tv_sec - file_ts.tv_sec); |
file_utime += sleepts.tv_nsec - file_ts.tv_nsec; |
file_utime += sleepts.tv_nsec - file_ts.tv_nsec; |
#endif |
#endif |
|
|
/* |
/* |
* run timeouts |
* run timeouts |
*/ |
*/ |
clock_gettime(CLOCK_MONOTONIC, &ts); |
clock_gettime(CLOCK_UPTIME, &ts); |
#ifdef DEBUG |
#ifdef DEBUG |
file_wtime += 1000000000LL * (ts.tv_sec - sleepts.tv_sec); |
file_wtime += 1000000000LL * (ts.tv_sec - sleepts.tv_sec); |
file_wtime += ts.tv_nsec - sleepts.tv_nsec; |
file_wtime += ts.tv_nsec - sleepts.tv_nsec; |
|
|
{ |
{ |
sigset_t set; |
sigset_t set; |
|
|
if (clock_gettime(CLOCK_MONOTONIC, &file_ts) < 0) { |
if (clock_gettime(CLOCK_UPTIME, &file_ts) < 0) { |
log_puts("filelist_init: CLOCK_MONOTONIC unsupported\n"); |
log_puts("filelist_init: CLOCK_UPTIME unsupported\n"); |
panic(); |
panic(); |
} |
} |
sigemptyset(&set); |
sigemptyset(&set); |