[smart] fixup of lwp recycling and mm varea (#8206)

Signed-off-by: shell <wangxiaoyao@rt-thread.com>
Signed-off-by: Shell <smokewood@qq.com>
Co-authored-by: xqyjlj <xqyjlj@126.com>
This commit is contained in:
Shell
2023-11-02 20:23:11 +08:00
committed by GitHub
parent 1b6f0e88a3
commit c2036e769a
17 changed files with 464 additions and 297 deletions

View File

@@ -298,12 +298,12 @@ static int _pthread_mutex_lock_timeout(void *umutex, struct timespec *timeout)
lwp_mutex_release_safe(&_pmutex_lock);
return -EDEADLK;
}
lwp_mutex_release_safe(&_pmutex_lock);
lock_ret = rt_mutex_take_interruptible(pmutex->lock.kmutex, time);
if (lock_ret == RT_EOK)
{
umutex_p->_m_lock = rt_thread_self()->tid;
}
lwp_mutex_release_safe(&_pmutex_lock);
break;
default: /* unknown type */
return -EINVAL;