]> git.baikalelectronics.ru Git - uboot.git/commit
event: Add basic support for events
authorSimon Glass <sjg@chromium.org>
Fri, 4 Mar 2022 15:43:00 +0000 (08:43 -0700)
committerTom Rini <trini@konsulko.com>
Thu, 10 Mar 2022 13:28:36 +0000 (08:28 -0500)
commitd9705477a70126df7b9bedc58ca3e4ee2948c10c
tree4512a25b7200e1c84cb07aa64a17f98c46a1a13f
parentedf20bf8433ef546513e61df47da46a059709266
event: Add basic support for events

Add a way to create and dispatch events without needing to allocate
memory. Also add a way to 'spy' on events, thus allowing 'hooks' to be
created.

Use a linker list for static events, which we can use to replace functions
like arch_cpu_init_f(). Allow an EVENT_DEBUG option which makes it
easier to see what is going on at runtime, but uses more code space.

Dynamic events allow the creation of a spy at runtime. This is not always
necessary, but can be enabled with EVENT_DYNAMIC if needed.

A 'test' event is the only option for now.

Signed-off-by: Simon Glass <sjg@chromium.org>
MAINTAINERS
common/Kconfig
common/Makefile
common/board_r.c
common/event.c [new file with mode: 0644]
common/log.c
include/asm-generic/global_data.h
include/event.h [new file with mode: 0644]
include/event_internal.h [new file with mode: 0644]
include/log.h