mirror of
https://gitee.com/openharmony/startup_init
synced 2025-02-17 02:18:39 +00:00
新增loop中timeout维测
Signed-off-by: ohxianzhi <duxianzhi@huawei.com>
This commit is contained in:
parent
f5280fe304
commit
7f62e02ceb
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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++) {
|
||||
|
@ -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)) { \
|
||||
|
Loading…
x
Reference in New Issue
Block a user