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

posix: implement sched_rr_get_interval() #68316

Merged

Conversation

moonlight83340
Copy link
Contributor

This is part of the See #51211 (RFC #51211).

sched_rr_get_interval() is required as part of _POSIX_PRIORITY_SCHEDULING Option Group.

For more information, please refer to https://pubs.opengroup.org/onlinepubs/9699919799/functions/sched_rr_get_interval.html

Function is actually placeholders and just return ENOSYS
since Zephyr does not yet support processes or process scheduling.

Fixes #66961

@moonlight83340 moonlight83340 force-pushed the sched_rr_get_interval branch 4 times, most recently from d05fcea to ce6ce50 Compare January 31, 2024 01:33
@moonlight83340 moonlight83340 marked this pull request as ready for review January 31, 2024 03:14
@zephyrbot zephyrbot added the area: POSIX POSIX API Library label Jan 31, 2024
@zephyrbot zephyrbot requested review from cfriedt and ycsin January 31, 2024 03:15
@@ -10,6 +10,8 @@

#include "posix_types.h"

#include "time.h"
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be grouped with the posix_types.h above

ycsin
ycsin previously approved these changes Jan 31, 2024
@moonlight83340
Copy link
Contributor Author

I will rebase tonight, my other PR has been merged so maybe the conflic is from that.

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.

Just a minor include nit, otherwise LGTM

@@ -9,6 +9,7 @@
#include <zephyr/kernel.h>

#include "posix_types.h"
#include "time.h"
Copy link
Member

Choose a reason for hiding this comment

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

This is a standard ISO C header file, so it should have angle brackets and have a newline after private headers (sorry, this is not yet built into .clang-format)

Suggested change
#include "time.h"
#include <time.h>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Noted, thank you !

cfriedt
cfriedt previously approved these changes Jan 31, 2024
ycsin
ycsin previously approved these changes Feb 1, 2024
Implement `sched_rr_get_interval()` POSIX APIs
as a part of PSE53 `_POSIX_PRIORITY_SCHEDULING` option group.
Functions is actually placeholders and just return `ENOSYS`
since Zephyr does not yet support processes or process scheduling.

signed-off-by: Gaetan Perrot <gaetanperrotpro@gmail.com>
`sched_rr_get_interval()` is now implemented,mark it so.

signed-off-by: Gaetan Perrot <gaetanperrotpro@gmail.com>
Implement tests for `sched_rr_get_interval()` .
Function is actually placeholders and just return `ENOSYS`
since Zephyr does not yet support processes or process scheduling.

signed-off-by: Gaetan Perrot <gaetanperrotpro@gmail.com>
@moonlight83340 moonlight83340 dismissed stale reviews from ycsin and cfriedt via f16e0f3 February 2, 2024 03:37
@moonlight83340
Copy link
Contributor Author

Rebase.

@carlescufi carlescufi merged commit 6fe676f into zephyrproject-rtos:main Feb 2, 2024
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: POSIX POSIX API Library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

posix: implement sched_rr_get_interval()
5 participants