新增loop中timeout维测

Signed-off-by: ohxianzhi <duxianzhi@huawei.com>
This commit is contained in:
ohxianzhi 2024-10-22 11:08:03 +08:00
parent f5280fe304
commit 7f62e02ceb
3 changed files with 5 additions and 1 deletions

View File

@ -417,7 +417,7 @@ int FsDmCreateLinearDevice(const char *devName, char *dmBlkName, uint64_t dmBlkN
return -1;
}
close(fd);
BEGET_LOGE("fs create rofs linear device success, dev is [%s]", devName);
BEGET_LOGI("fs create rofs linear device success, dev is [%s]", devName);
return 0;
}

View File

@ -113,6 +113,9 @@ static LE_STATUS RunLoop_(const EventLoop *loop)
} else {
timeout = (int)(minTimePeriod - GetCurrentTimespec(0));
}
if (timeout < 0 || timeout > 1000) { //1000ms
LE_LOGW("timeout:%d", timeout);
}
int number = epoll_wait(epoll->epollFd, epoll->waitEvents, loop->maxevents, timeout);
for (int index = 0; index < number; index++) {

View File

@ -34,6 +34,7 @@
#define LE_LOGI(fmt, ...) STARTUP_LOGI(LE_DOMAIN, LE_LABEL, fmt, ##__VA_ARGS__)
#define LE_LOGE(fmt, ...) STARTUP_LOGE(LE_DOMAIN, LE_LABEL, fmt, ##__VA_ARGS__)
#define LE_LOGV(fmt, ...) STARTUP_LOGV(LE_DOMAIN, LE_LABEL, fmt, ##__VA_ARGS__)
#define LE_LOGW(fmt, ...) STARTUP_LOGW(LE_DOMAIN, LE_LABEL, fmt, ##__VA_ARGS__)
#define LE_CHECK(ret, exper, ...) \
if (!(ret)) { \