lib: notify: build sys-notify conditionally.

Add a new Kconfig and build this code conditionally, so we do not end up
with this file being built for each zephyr app.

Partial fix for #50654

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2022-09-26 12:48:02 -04:00 committed by Carles Cufí
parent a81b322828
commit a5bd666f4e
4 changed files with 9 additions and 1 deletions

View file

@ -9,5 +9,6 @@ config COUNTER_MAXIM_DS3231
depends on DT_HAS_MAXIM_DS3231_ENABLED
depends on I2C
select POLL
select NOTIFY
help
Enable counter driver based on Maxim DS3231 I2C device.

View file

@ -12,7 +12,6 @@ zephyr_sources(
dec.c
fdtable.c
hex.c
notify.c
printk.c
rb.c
sem.c
@ -25,6 +24,7 @@ zephyr_sources(
)
zephyr_sources_ifdef(CONFIG_ONOFF onoff.c)
zephyr_sources_ifdef(CONFIG_NOTIFY notify.c)
zephyr_sources_ifdef(CONFIG_CBPRINTF_COMPLETE cbprintf_complete.c)
zephyr_sources_ifdef(CONFIG_CBPRINTF_NANO cbprintf_nano.c)

View file

@ -16,6 +16,11 @@ config RING_BUFFER
buffers manage their own buffer memory and can store arbitrary data.
For optimal performance, use buffer sizes that are a power of 2.
config NOTIFY
bool "Asynchronous Notifications"
help
Use this API to support async transactions.
config BASE64
bool "Base64 encoding and decoding"
help
@ -40,6 +45,7 @@ config MPSC_PBUF
config ONOFF
bool "On-Off Manager"
select NOTIFY
help
An on-off manager supports an arbitrary number of clients of a
service which has a binary state. Example applications are power

View file

@ -1,3 +1,4 @@
CONFIG_POLL=y
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y
CONFIG_NOTIFY=y