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

kernel: prioritize C atomic functions if selected #33964

Merged
merged 3 commits into from
Apr 2, 2021

Commits on Apr 1, 2021

  1. xtensa: change CONFIG_ATOMIC_OPERATIONS_ARCH to imply

    Xtensa cores are highly configurable so each SoC may not have
    the needed instructions for the hardware assisted atomic
    operations. So instead of selecting the arch-specific atomic
    operations kconfig, do a "imply" instead. So SoC or board
    configs can disable this.
    
    Signed-off-by: Daniel Leung <[email protected]>
    dcpleung committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    fc5ad7e View commit details
    Browse the repository at this point in the history
  2. kernel: remove C syscall include in builtin atomic header

    The builtin atomic header file should not include the syscall
    header that is generated from C version of atomic functions.
    
    Signed-off-by: Daniel Leung <[email protected]>
    dcpleung committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    448a3a4 View commit details
    Browse the repository at this point in the history
  3. kernel: prioritize C atomic functions if selected

    Usually, GCC builtin or arch-specific atomic functions are being
    used. The corresponding kconfigs are "selected" by architecture
    or SoC kconfigs. CONFIG_ATOMIC_OPERATIONS_C is usually used to
    override the GCC built-in or arch-specific atomic functions when
    these two are not supported. So change the priority of #include
    so that C version is included first if selected, and skips
    the inline versions of the other two variants. Or else there
    will be two compiled versions of atomic functions: inline version
    and the compiled C version. Note that the arch-specific version
    and builtin are swapped, so the builtin one is now the default.
    
    Fixes zephyrproject-rtos#33857
    
    Signed-off-by: Daniel Leung <[email protected]>
    dcpleung committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    ae14ccf View commit details
    Browse the repository at this point in the history