Skip to content
Commit 1cadd8b3 authored by Peter Bigot's avatar Peter Bigot Committed by Anas Nashif
Browse files

device: perform dynamic device initialization during system startup



Initialize all device objects in a batch before invoking any code that
might try to reference data in them.  This eliminates a race condition
enabled by the ability to resolve a device structure at build time,
and reference it from one device's initialization routine before the
device itself has been initialized.

While the device is pulled from the sys_init records rather than
static devices, all in-tree init_entry records that are associated
with devices are produced via Z_DEVICE_DEFINE(), so there should be no
static devices that would be missed by instead iterating over the
device records.

Signed-off-by: default avatarPeter Bigot <peter.bigot@nordicsemi.no>
parent a955c9e1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment