The latest development version of this page may be more current than this released 2.5.0 version.
CONFIG_FPU_SHARING

FPU register sharing

Type: bool

Help

This option enables preservation of the hardware floating point registers across context switches to allow multiple threads to perform concurrent floating point operations.

Note that on Cortex-M processors with the floating point extension we enable by default the FPU register sharing mode, as some GCC compilers may activate a floating point context by generating FP instructions for any thread, and that context must be preserved when switching such threads in and out. The developers can still disable the FP sharing mode in their application projects, and switch to Unshared FP registers mode, if it is guaranteed that the image code does not generate FP instructions outside the single thread context that is allowed to do so.

Direct dependencies

FPU && MULTITHREADING

(Includes any dependencies from ifs and menus.)

Default

Kconfig definition

At arch/Kconfig:765

Included via Kconfig:8Kconfig.zephyr:29

Menu path: (Top) → Floating Point Options → Enable floating point unit (FPU)

config FPU_SHARING
    bool "FPU register sharing"
    default y if ARM && ARMV7_M_ARMV8_M_FP
    depends on FPU && MULTITHREADING
    help
      This option enables preservation of the hardware floating point registers
      across context switches to allow multiple threads to perform concurrent
      floating point operations.

      Note that on Cortex-M processors with the floating point extension we
      enable by default the FPU register sharing mode, as some GCC compilers
      may activate a floating point context by generating FP instructions for
      any thread, and that context must be preserved when switching such
      threads in and out. The developers can still disable the FP sharing
      mode in their application projects, and switch to Unshared FP registers
      mode, if it is guaranteed that the image code does not generate FP
      instructions outside the single thread context that is allowed to do so.

(The ‘depends on’ condition includes propagated dependencies from ifs and menus.)