Skip to content

Conversation

@ioannisg
Copy link
Member

Two patches for kernel/init.c

  • a trivial removal of CONFIG_MULTITHREADING
  • a forcing of using K_THREAD_STACK_SIZEOF in switch_to_main_thread

It's a cleanup - no behavioral changes.

For architectures with custom swap to main, currently:
- arm
- posix
we are now using K_THREAD_STACK_SIZEOF macro to pass the
main thread stack size to z_arch_switch_to_main_thread().

This does not introduce any behavioral changes for posix;
the K_THREAD_STACK_SIZEOF() simply returns the sizeof()
the stack object. For Arm, this allows us to clean-up one
more occurence of CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT
in kernel_arch_func.h.

Signed-off-by: Ioannis Glaropoulos <[email protected]>
@ioannisg ioannisg added area: Kernel area: ARM ARM (32-bit) Architecture Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. labels May 24, 2019
@ioannisg ioannisg requested a review from aescolar May 24, 2019 13:38
Copy link
Member

@carlescufi carlescufi left a comment

Choose a reason for hiding this comment

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

*ease of reading

@aescolar aescolar removed their request for review May 24, 2019 13:50
Copy link
Member

@aescolar aescolar left a comment

Choose a reason for hiding this comment

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

The POSIX arch does not care indeed (does not use that param)

Remove a redundant #ifdef CONFIG_MULTITHREADING guard
for a code block already inside CONFIG_MULTITHREADING.
Add some inline #endif comments for ease of reading.

Signed-off-by: Ioannis Glaropoulos <[email protected]>
@ioannisg ioannisg force-pushed the arch_arm_main_thread_init_cleanup branch from cec293d to bf28d41 Compare May 24, 2019 14:01
@ioannisg
Copy link
Member Author

*ease of reading

fixed

@nashif nashif merged commit 7583696 into zephyrproject-rtos:master May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ARM ARM (32-bit) Architecture area: Kernel Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants