Skip to content

Conversation

@vivek1-j
Copy link
Contributor

*This API returns the CPU mask being maintained by Scheduler

Signed-Off By: Vivek Jain (vivek1.j@samsung.com)

* None
****************************************************************************/

cpu_set_t sched_cpumask(void)
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, thanks

@vivek1-j vivek1-j force-pushed the sched_cpu_mask_api branch from 8eccca3 to 8231257 Compare January 5, 2026 06:32
@vivek1-j vivek1-j requested a review from ewoodev January 6, 2026 05:52
@@ -0,0 +1,72 @@
/****************************************************************************
*
* Copyright 2025 Samsung Electronics All Rights Reserved.
Copy link
Contributor

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

Copy link
Contributor Author

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)
Copy link
Contributor

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()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, thanks

@vivek1-j vivek1-j force-pushed the sched_cpu_mask_api branch from 8231257 to a40053a Compare January 7, 2026 07:07
/****************************************************************************
* Included Files
****************************************************************************/
#include <debug.h>
Copy link
Contributor

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?

Copy link
Contributor Author

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?

Copy link
Contributor

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.

Copy link
Contributor Author

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)
@vivek1-j vivek1-j force-pushed the sched_cpu_mask_api branch from a40053a to 1f685dc Compare January 7, 2026 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants