Skip to content

lib: posix: allow eventfd on ARCH_POSIX platform #47856

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

Closed
TomzBench opened this issue Jul 15, 2022 · 2 comments
Closed

lib: posix: allow eventfd on ARCH_POSIX platform #47856

TomzBench opened this issue Jul 15, 2022 · 2 comments
Labels
area: native port Host native arch port (native_sim) Enhancement Changes/Updates/Additions to existing features

Comments

@TomzBench
Copy link
Contributor

TomzBench commented Jul 15, 2022

Is your enhancement proposal related to a problem? Please describe.
I would like to be able to use eventfd on native_posix_64 platform for testing purposes.

Describe the solution you'd like
Currently - eventfd is treated as a general library feature and maintained under lib/posix ... And this feature depends on !ARCH_POSIX. However - other socket API do not have this same limitation. ...In the context of zephyr, I think eventfd is more of a network feature as this API is only useful when using zsock_poll (as opposed to the more universal k_poll).

So my proposal is to name space this feature using the same infrastructure as other socket API methods. zsock_eventfd. The feature could be an addon similar to socketpair.

Describe alternatives you've considered
I could use zsock_socketpair - however, this is a more heavy weight solution for my use case, and adds addition prj.conf with extra requirements that should not be necessary for my use case (aka: HEAP_MEM_POOL_SIZE, SOCKETPAIR_BUFFER_SIZE)

Additional context
For history - here is the PR where it was decided to require !ARCH_POSIX, #22863
I hope this can be re-evaluated.

@TomzBench TomzBench added the Enhancement Changes/Updates/Additions to existing features label Jul 15, 2022
@henrikbrixandersen henrikbrixandersen added the area: native port Host native arch port (native_sim) label Jul 19, 2022
@aescolar
Copy link
Member

With the new native_sim (successor of native_posix) eventfd can be used.
Therefore closing as done.

@TomzBench
Copy link
Contributor Author

great !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: native port Host native arch port (native_sim) Enhancement Changes/Updates/Additions to existing features
Projects
None yet
Development

No branches or pull requests

3 participants