Skip to content

Conversation

@JordanYates
Copy link
Contributor

@zephyrbot zephyrbot added the area: POSIX POSIX API Library label Apr 13, 2024
@zephyrbot zephyrbot requested review from cfriedt and ycsin April 13, 2024 05:45
Copy link
Member

@cfriedt cfriedt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWICT, the external definition in picolibc and newlib is broken for the posix use case if realtime signals are enabled, depending on the platform, as unsigned long (__sigset_t) is only 32 bits on 32-bit platforms and realtime signals can add several extra bits.

Curious what @ycsin thinks about it though.

Timing-wise, I was actually in the process of defining some signal facilities at the kernel level too, so it will be interesting to see how this plays out.

@ycsin
Copy link
Member

ycsin commented Apr 14, 2024

Curious what @ycsin thinks about it though.

I wonder how it will work out since the underlying implementation should be different?

@JordanYates
Copy link
Contributor Author

Curious what @ycsin thinks about it though.

I wonder how it will work out since the underlying implementation should be different?

This only fixs the first problem, which is the compiler erroring out because of a redefinition of the struct.
It makes no claims as to whether the underlying implementations will work properly.
I was hitting this case in external module code where both this file and standard library signal file were both included, even though they weren't being used AFAICT.

@cfriedt
Copy link
Member

cfriedt commented May 22, 2024

@JordanYates - this is still on my radar, but there is a pretty big change that I think it overlaps with. My hopes are that we can have a single location for defining sigset_t as a result.

@JordanYates
Copy link
Contributor Author

@JordanYates - this is still on my radar, but there is a pretty big change that I think it overlaps with. My hopes are that we can have a single location for defining sigset_t as a result.

Happy for a more complete solution upstream instead of this bandaid.

@cfriedt
Copy link
Member

cfriedt commented Jul 10, 2024

A more complete solution was scheduled as a bugfix for v3.7.0, but I have my doubts that the prerequisite PRs will make it in, so it looks like the fix for this will also not be a part of v3.7

@MaureenHelm
Copy link
Member

@cfriedt please revisit

@github-actions
Copy link

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions
Copy link

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@kartben
Copy link
Contributor

kartben commented Dec 22, 2024

Copy link
Member

@cfriedt cfriedt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if the definition for sigset were moved to a separate header, <zephyr/posix/sys/_sigset.h>, and that header was included here, I would be more inclined to approve.

@JordanYates
Copy link
Contributor Author

I think if the definition for sigset were moved to a separate header, <zephyr/posix/sys/_sigset.h>, and that header was included here, I would be more included to approve.

Why is a dedicated header preferred? It's not the pattern I see in the other usage.

@cfriedt
Copy link
Member

cfriedt commented Jan 21, 2025

Why is a dedicated header preferred? It's not the pattern I see in the other usage.

Because that's the change that I have had staged in another WIP PR for a while.

@github-actions
Copy link

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label Mar 23, 2025
@github-actions github-actions bot closed this Apr 6, 2025
@JordanYates JordanYates reopened this Apr 6, 2025
@JordanYates JordanYates removed the Stale label Apr 6, 2025
@JordanYates JordanYates force-pushed the 240413_posix_signal_redef branch from dbb196e to ae0931e Compare April 6, 2025 00:44
@JordanYates
Copy link
Contributor Author

Why is a dedicated header preferred? It's not the pattern I see in the other usage.

Because that's the change that I have had staged in another WIP PR for a while.

I don't think it is worth complicating this PR in order to align with a PR that has been WIP for almost a year, unless there is some reason why merging this change is incompatible with whatever you are working on. This is a trivial change that solves a real problem.

Only define `sigset_t` if it has not already been defined externally,
for example in `picolibc/include/sys/signal.h`.

Signed-off-by: Jordan Yates <[email protected]>
@JordanYates JordanYates force-pushed the 240413_posix_signal_redef branch from ae0931e to 2484f57 Compare April 15, 2025 23:17
@JordanYates
Copy link
Contributor Author

Damn, I missed the first birthday of this PR :)

@JordanYates JordanYates requested a review from cfriedt June 8, 2025 01:57
@JordanYates JordanYates added this to the v4.2.0 milestone Jun 14, 2025
@danieldegrasse danieldegrasse removed this from the v4.2.0 milestone Jul 21, 2025
@JordanYates JordanYates added this to the v4.3.0 milestone Aug 21, 2025
@github-actions
Copy link

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: POSIX POSIX API Library Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants