RT-Thread / RT-Thread/rt-thread
[ipc] mutex take 被 signal 中断后没有正确返回错误
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 12.2k
- Forks
- 5.4k
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 40
Description
问题
mtuex 在 suspend 之前没有重置 thread->error 导致被信号中断后没有正确得到反馈。
https://github.com/RT-Thread/rt-thread/blob/a6fcb4f8a13709e836b9133a08d573fc0dfd398a/src/ipc.c#L1246
参考 sem 的方式如下:
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
Read src/ipc.c around line 1246 and compare the mutex path with the semaphore handling at lines 548-554. Verify how thread->error is handled when mutex acquisition is suspended and then interrupted by a signal; done means the mutex operation returns the correct error in that case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot, operating-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100