dfs v2 修改 fd_new 的 startfd 起始值为 0 ;修复 futex_wait 超时时间换算异常; (#7705)

Signed-off-by: yangfasheng <yangfasheng@live.com>
This commit is contained in:
yangfasheng
2023-06-20 23:09:58 +08:00
committed by GitHub
parent 3e4797c63c
commit b4e59bac4e
3 changed files with 32 additions and 8 deletions

View File

@@ -124,7 +124,12 @@ int futex_wait(struct rt_futex *futex, int value, const struct timespec *timeout
/* with timeout */
if (timeout)
{
rt_int32_t time = rt_timespec_to_tick(timeout);
rt_int32_t time = timeout->tv_sec * RT_TICK_PER_SECOND + timeout->tv_nsec * RT_TICK_PER_SECOND / NANOSECOND_PER_SECOND;
if (time < 0)
{
time = 0;
}
/* start the timer of thread */
rt_timer_control(&(thread->thread_timer),