aboutsummaryrefslogtreecommitdiff
path: root/kernel/include/util/init.h
blob: 9be7e3cb0ff360388e54f8c6348940df0c0385b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once

#define init_func(func)          \
    __asm__(                     \
        ".pushsection .init\n\t" \
        ".long " #func           \
        "\n\t"                   \
        ".string \"" #func       \
        "\"\n\t"                 \
        ".popsection\n\t");
#define init_depends(name)       \
    __asm__(                     \
        ".pushsection .init\n\t" \
        ".long 0\n\t"            \
        ".string \"" #name       \
        "\"\n\t"                 \
        ".popsection\n\t");

typedef void (*init_func_t)();

void init_call_all(void);