mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-05-31 20:05:59 +08:00
fix rt_channel lock. (#8244)
This commit is contained in:
@@ -79,6 +79,10 @@ int lwp_component_init(void)
|
|||||||
{
|
{
|
||||||
LOG_E("%s: lwp_pid_init() failed", __func__);
|
LOG_E("%s: lwp_pid_init() failed", __func__);
|
||||||
}
|
}
|
||||||
|
else if ((rc = rt_channel_component_init()) != RT_EOK)
|
||||||
|
{
|
||||||
|
LOG_E("%s: rt_channel_component_init failed", __func__);
|
||||||
|
}
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
INIT_COMPONENT_EXPORT(lwp_component_init);
|
INIT_COMPONENT_EXPORT(lwp_component_init);
|
||||||
|
|||||||
+117
-60
File diff suppressed because it is too large
Load Diff
@@ -63,6 +63,8 @@ rt_err_t rt_raw_channel_recv(rt_channel_t ch, rt_channel_msg_t data);
|
|||||||
rt_err_t rt_raw_channel_recv_timeout(rt_channel_t ch, rt_channel_msg_t data, rt_int32_t time);
|
rt_err_t rt_raw_channel_recv_timeout(rt_channel_t ch, rt_channel_msg_t data, rt_int32_t time);
|
||||||
rt_err_t rt_raw_channel_peek(rt_channel_t ch, rt_channel_msg_t data);
|
rt_err_t rt_raw_channel_peek(rt_channel_t ch, rt_channel_msg_t data);
|
||||||
|
|
||||||
|
rt_err_t rt_channel_component_init(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1449,6 +1449,7 @@ struct rt_channel
|
|||||||
{
|
{
|
||||||
struct rt_ipc_object parent; /**< inherit from object */
|
struct rt_ipc_object parent; /**< inherit from object */
|
||||||
struct rt_thread *reply; /**< the thread will be reply */
|
struct rt_thread *reply; /**< the thread will be reply */
|
||||||
|
struct rt_spinlock slock; /**< spinlock of this channel */
|
||||||
rt_list_t wait_msg; /**< the wait queue of sender msg */
|
rt_list_t wait_msg; /**< the wait queue of sender msg */
|
||||||
rt_list_t wait_thread; /**< the wait queue of sender thread */
|
rt_list_t wait_thread; /**< the wait queue of sender thread */
|
||||||
rt_wqueue_t reader_queue; /**< channel poll queue */
|
rt_wqueue_t reader_queue; /**< channel poll queue */
|
||||||
|
|||||||
Reference in New Issue
Block a user