X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/8b8f49b713d64065775fe538232f8639083601bd..2236410f4582ab45ae8c384dd6eeeef5d10aab15:/lunaix-os/kernel/device/devdb.c?ds=sidebyside diff --git a/lunaix-os/kernel/device/devdb.c b/lunaix-os/kernel/device/devdb.c index 1c9ee4c..236ac5a 100644 --- a/lunaix-os/kernel/device/devdb.c +++ b/lunaix-os/kernel/device/devdb.c @@ -4,7 +4,7 @@ #include -#include +#include static DECLARE_HASHTABLE(dev_registry, 32); static DECLARE_HASHTABLE(dev_byif, 8); @@ -85,32 +85,33 @@ device_definitions_byif(int if_type) return &dev_byif[__hashkey(dev_byif, if_type)]; } -#define device_load_on_stage(stage) \ +#define __device_load_on_stage(stage) \ ({ \ int idx = 0; \ struct device_def* devdef; \ - ldga_foreach(dev_ld_##stage, struct device_def*, idx, devdef) \ + ldga_foreach(dev_##stage, struct device_def*, idx, devdef) \ { \ devdef->init(devdef); \ } \ }) +#define device_load_on_stage(stage) __device_load_on_stage(stage) void -device_earlystage() +device_onbooot_load() { - device_load_on_stage(early); + device_load_on_stage(load_onboot); } void -device_timerstage() +device_postboot_load() { - device_load_on_stage(aftertimer); + device_load_on_stage(load_postboot); } void -device_poststage() +device_sysconf_load() { - device_load_on_stage(post); + device_load_on_stage(load_sysconf); } static int