mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-02 23:41:56 +00:00
Normally a syscall would check the current privilege level and then decide to go to _impl_<syscall> directly or go through a _handler_<syscall>. __ZEPHYR_SUPERVISOR__ is a compiler optimization flag which will make all the system calls from the driver files directly link to the _impl_<syscall>. Thereby reducing the overhead of checking the privileges. In the previous implementation all the source files would be compiled by zephyr_source() rule. This means that zephyr_* is a catchall CMake library for source files that can be built purely with the include paths, defines, and other compiler flags that all zephyr source files uses. This states that adding one extra compiler flag for only one complete directory would fail. This limitation can be overcome by using zephyr_libray* APIs. This creates a library for the required directories and it also supports directory level properties. Hence we use zephyr_library* to create a new library with macro _ZEPHYR_SUPERVISOR_ for the optimization. Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
12 lines
516 B
CMake
12 lines
516 B
CMake
zephyr_library()
|
|
|
|
zephyr_library_sources_ifdef(CONFIG_PWM_PCA9685 pwm_pca9685.c)
|
|
zephyr_library_sources_ifdef(CONFIG_PWM_DW pwm_dw.c)
|
|
zephyr_library_sources_ifdef(CONFIG_PWM_QMSI pwm_qmsi.c)
|
|
zephyr_library_sources_ifdef(CONFIG_PWM_STM32 pwm_stm32.c)
|
|
zephyr_library_sources_ifdef(CONFIG_PWM_NRF5_SW pwm_nrf5_sw.c)
|
|
zephyr_library_sources_ifdef(CONFIG_PWM_MCUX_FTM pwm_mcux_ftm.c)
|
|
zephyr_library_sources_ifdef(CONFIG_PWM_LED_ESP32 pwm_led_esp32.c)
|
|
|
|
zephyr_library_sources_ifdef(CONFIG_USERSPACE pwm_handlers.c)
|