mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-25 16:57:20 +00:00
[smart] Replace irq disable/enable codes in futex (#7941)
Signed-off-by: Shell <smokewood@qq.com>
This commit is contained in:
@@ -331,6 +331,7 @@ rt_lwp_t lwp_create(rt_base_t flags)
|
||||
lwp_user_object_lock_init(new_lwp);
|
||||
rt_wqueue_init(&new_lwp->wait_queue);
|
||||
lwp_signal_init(&new_lwp->signal);
|
||||
rt_mutex_init(&new_lwp->lwp_lock, "lwp_lock", RT_IPC_FLAG_PRIO);
|
||||
|
||||
/* lwp with pid */
|
||||
if (flags & LWP_CREATE_FLAG_ALLOC_PID)
|
||||
@@ -392,6 +393,8 @@ void lwp_free(struct rt_lwp* lwp)
|
||||
|
||||
lwp_user_object_clear(lwp);
|
||||
lwp_user_object_lock_destroy(lwp);
|
||||
RT_ASSERT(lwp->lwp_lock.owner == RT_NULL);
|
||||
rt_mutex_detach(&lwp->lwp_lock);
|
||||
|
||||
/* free data section */
|
||||
if (lwp->data_entry != RT_NULL)
|
||||
|
||||
Reference in New Issue
Block a user