_serial_dma_tx中的dma发送去做dataqueue意义不大

Open
#11,176 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
c

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.

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失去了想要实现的异步效果

Dominant language
C
Stars
12.4k
Forks
5.5k
Avg merge
3d 7h
Merged PRs (30d)
79

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from RT-Thread/rt-thread

All issues in RT-Thread/rt-thread

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.