Skip to content
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

add spinlock_type.h #14801

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

add spinlock_type.h #14801

wants to merge 1 commit into from

Conversation

hujun260
Copy link
Contributor

Summary

add spinlock_type.h
reason:
Due to incomplete handling of spinlock_t in arch/spinlock.h, it should not be used directly by external code.
Furthermore, because pthread.h and nuttx/spinlock.h have a circular dependency, pthread.h cannot successfully include nuttx/spinlock.h. Therefore, we have split spinlock_type.h from spinlock.h.

Impact

spinlock

Testing

ci

reason:
Due to incomplete handling of spinlock_t in arch/spinlock.h,
it should not be used directly by external code.
Furthermore, because pthread.h and nuttx/spinlock.h have a circular
dependency, pthread.h cannot successfully include nuttx/spinlock.h.
Therefore, we have split spinlock_type.h from spinlock.h.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
@github-actions github-actions bot added Area: OS Components OS Components issues Size: M The size of the change in this PR is medium labels Nov 15, 2024
@nuttxpr
Copy link

nuttxpr commented Nov 15, 2024

[Experimental Bot, please feedback here]

No. This PR description lacks crucial details required by the NuttX guidelines. Here's why and what's missing:

  • Insufficient Summary: While the summary states what changed, it doesn't adequately explain how it works. It mentions circular dependencies and incomplete handling, but lacks specifics. For example:

    • How was the spinlock_t incompletely handled before? Give a concrete example.
    • Precisely what went into spinlock_type.h and what stayed in spinlock.h?
    • What code now includes spinlock_type.h that previously included spinlock.h?
  • Incomplete Impact Assessment: "spinlock" is not a sufficient impact description. Address all the impact points individually. At the very least, explicitly state "NO" for those that aren't applicable. For example:

    • Impact on user: Does the user need to change any code due to this split?
    • Impact on build: Does the build system need any modifications?
    • Impact on hardware: Are any architectures or boards affected?
    • Impact on documentation: Does this change necessitate documentation updates?
    • ...and so on for all the impact categories.
  • Insufficient Testing: "ci" is not adequate testing verification. Provide:

    • Specific build host details (OS, compiler version, etc.).
    • Specific target details (architecture, board, configuration).
    • Actual before and after logs demonstrating the problem and the fix. Simply stating that CI passed isn't enough; the reviewer needs to see the evidence.

In short, this PR description needs significantly more detail to meet NuttX requirements. Focus on providing concrete information and evidence to support the changes.

@xiaoxiang781216
Copy link
Contributor

add spinlock_type.h reason: Due to incomplete handling of spinlock_t in arch/spinlock.h, it should not be used directly by external code. Furthermore, because pthread.h and nuttx/spinlock.h have a circular dependency, pthread.h cannot successfully include nuttx/spinlock.h. Therefore, we have split spinlock_type.h from spinlock.h.

But the circular dependency doesn't introduce any bad side effect now?

@hujun260
Copy link
Contributor Author

add spinlock_type.h reason: Due to incomplete handling of spinlock_t in arch/spinlock.h, it should not be used directly by external code. Furthermore, because pthread.h and nuttx/spinlock.h have a circular dependency, pthread.h cannot successfully include nuttx/spinlock.h. Therefore, we have split spinlock_type.h from spinlock.h.

But the circular dependency doesn't introduce any bad side effect now?

Yes, we haven't encountered this situation yet. In Linux, there is a similar concept called "spinlock_types.h".
image

@xiaoxiang781216
Copy link
Contributor

let's hold this patch until the recursive happen?

@hujun260
Copy link
Contributor Author

let's hold this patch until the recursive happen?

ok

@xiaoxiang781216 xiaoxiang781216 marked this pull request as draft November 21, 2024 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: OS Components OS Components issues Size: M The size of the change in this PR is medium
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants