-
Notifications
You must be signed in to change notification settings - Fork 620
os/kernel/sched: Development of CPU ON/OFF state API. #7097
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
base: master
Are you sure you want to change the base?
Conversation
os/kernel/sched/sched_cpumask.c
Outdated
| * None | ||
| ****************************************************************************/ | ||
|
|
||
| cpu_set_t sched_cpumask(void) |
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.
Could you please rename to include active or ailve?
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.
Done, thanks
8eccca3 to
8231257
Compare
| @@ -0,0 +1,72 @@ | |||
| /**************************************************************************** | |||
| * | |||
| * Copyright 2025 Samsung Electronics All Rights Reserved. | |||
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.
minor, please modify to 2026
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.
Done, thanks
| * None | ||
| ****************************************************************************/ | ||
|
|
||
| cpu_set_t sched_activecpumask(void) |
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.
minor,
i should have more clear to naming.
the name can be also confused, it might be meaned set active cpus
to more clearly, how about sched_getactivecpus()
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.
Done, thanks
8231257 to
a40053a
Compare
os/kernel/sched/sched_getactivecpu.c
Outdated
| /**************************************************************************** | ||
| * Included Files | ||
| ****************************************************************************/ | ||
| #include <debug.h> |
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.
It may not be necessary right now, but it would be a good idea to add #include <tinyara/config.h> for future use.
And why do you include debug.h?
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.
I thought of adding debug logs as I was planning API differently earlier, therefore included debug.h. It is not required now, I'll remove it, good catch, thanks.
BTW, why do you think <tinyara/config.h> might be required in future? Anything specific in your mind?
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.
Predefined configs in .config file are auto included in tinyara/config.h in build time.
So config like CONFIG_SMP or other scheduler configs are contained in that file.
Since it is the top-level config that makes up the system, it seems advisable to include it even if it is unnecessary.
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.
Done, thanks
*This API returns the CPU mask being maintained by Scheduler Signed-Off By: Vivek Jain (vivek1.j@samsung.com)
a40053a to
1f685dc
Compare
Signed-Off By: Vivek Jain (vivek1.j@samsung.com)