-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce the size of tcb #15345
Reduce the size of tcb #15345
Conversation
[Experimental Bot, please feedback here] No, this PR description does not fully meet the NuttX requirements. While it provides a summary and testing information, it lacks crucial details required for proper review. Here's a breakdown of what's missing and how to improve it: Missing Information & Suggested Improvements:
By addressing these points, you'll create a much more comprehensive and reviewable PR, increasing its chances of being accepted. Remember to follow the contributing guidelines carefully. |
fix compile error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wangzhi-art please include more details in the git commit log message to explain why the old code is not needed anymore. Is there some drawback after removing these lines of code?
5da65c8
to
817406d
Compare
Done |
Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
Note: Please adhere to Contributing Guidelines.
Summary
Why the old code is not needed anymore?
There is a variable tcb->sigdeliver in the current tcb structure, which is used to determine whether there is a new signal to be processed. When there is a signal to be processed, the address of the nxsig_deliver function will be assigned to tcb->sigdeliver. At the same time, if there are other signals to be processed, it will first determine whether the value of tcb->sigdeliver is empty. All signal processing is in the nxsig_deliver function, so we can call this function directly; and when judging whether there is a new signal to be delivered, we can add a flag bit TCB_FLAG_SIGDELIVER in tcb->flags. Only one bit is needed to achieve the previous effect, which optimizes both execution time and space.
Is there some drawback after removing these lines of code?
There are no drawback so far.
Impact
None.
Testing
Testcase ostest is executed without failure in the smp environment of armv7a and armv8a.