RT-Thread / RT-Thread/rt-thread

ps命令查询线程状态,由于`rt_thread_sleep`中临时改变状态会导致ps出的状态与实际状态不一致,影响判断

Open
#6,768 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
12.2k
Forks
5.4k
Avg merge
4d 12h
Merged PRs (30d)
40

Description

现象

image
出现问题的地方

image

描述:上述临时改变错误码的操作会导致ps的时候显示出这个错误码,影响用户判断线程状态。

Contributor guide

Open the contributing guide

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.

Research direction

Start with rt_thread_sleep and the ps thread-status path described in the report, then reproduce the mismatch between the temporary state and the thread's actual state. Trace where the temporary error code becomes visible to ps; done means ps reports the effective thread state consistently rather than the transient value.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.