RT-Thread / RT-Thread/rt-thread
_serial_dma_tx中的dma发送去做dataqueue意义不大
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 12.2k
- Forks
- 5.4k
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 40
Description
https://github.com/RT-Thread/rt-thread/blob/68da10625347cfe34fad8b73a78feffbe311d561/components/drivers/serial/dev_serial.c#L580
_serial_dma_tx中的dma发送如果不做同步发送,由于dataqueue没有拷贝数据副本,将可能出现内存非法访问
如果做了同步机制,由于tx_complete回调局限于device,只能做串行化发送,dataqueue失去了想要实现的异步效果
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in components/drivers/serial/dev_serial.c around _serial_dma_tx, then trace how dataqueue ownership interacts with the tx_complete callback. Determine how the current asynchronous path can access released data and how synchronization affects serialization. Done means resolving the invalid-memory-access risk without losing the intended asynchronous behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot, operating-systems
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100