little kernel代码片段
来源:互联网 发布:安捷伦数据采集仪 编辑:程序博客网 时间:2024/06/16 23:51
/* 对LK中这段代码的理解 */
void apps_init(void)
{
const struct app_descriptor *app;
/* call all the init routines */
/* 遍历所有在__apps_start 到__apps_end段里的函数,并调用其init函数 */
/* __apps_start 和__apps_end包含的段的段名在下面这个文件里指定为.apps段
* arch/arm/system-twosegment.ld
* 在下面的文件里定义了一个宏来指定怎么样的函数放到上面的段中去,即被该红修饰的函数
* include/app.h
* #define APP_START(appname) struct app_descriptor _app_##appname __SECTION(".apps") = {
* .name = #appname,
* #define APP_END };
*/
for (app = &__apps_start; app != &__apps_end; app++) {
if (app->init)
app->init(app);
}
/* start any that want to start on boot */
for (app = &__apps_start; app != &__apps_end; app++) {
if (app->entry && (app->flags & APP_FLAG_DONT_START_ON_BOOT) == 0) {
start_app(app);
}
}
}
void apps_init(void)
{
const struct app_descriptor *app;
/* call all the init routines */
/* 遍历所有在__apps_start 到__apps_end段里的函数,并调用其init函数 */
/* __apps_start 和__apps_end包含的段的段名在下面这个文件里指定为.apps段
* arch/arm/system-twosegment.ld
* 在下面的文件里定义了一个宏来指定怎么样的函数放到上面的段中去,即被该红修饰的函数
* include/app.h
* #define APP_START(appname) struct app_descriptor _app_##appname __SECTION(".apps") = {
* .name = #appname,
* #define APP_END };
*/
for (app = &__apps_start; app != &__apps_end; app++) {
if (app->init)
app->init(app);
}
/* start any that want to start on boot */
for (app = &__apps_start; app != &__apps_end; app++) {
if (app->entry && (app->flags & APP_FLAG_DONT_START_ON_BOOT) == 0) {
start_app(app);
}
}
}
0 0
- little kernel代码片段
- bootloader之little kernel
- little kernel init
- little kernel分析
- little kernel分析 [LK]
- 代码片段
- 代码片段
- 代码片段
- 代码片段
- 片段代码
- 代码片段
- 代码片段
- 代码片段
- 代码片段
- 代码片段
- 代码片段。
- 代码片段
- 代码片段
- ASP.Net与存储过程
- 51nod 1419:最小公倍数挑战
- iOS 中播放gif图片
- 在定点二进制运算器中,减法运算一般通过什么来实现
- UUID
- little kernel代码片段
- ZOJ 2277 The Gate to Freedom(n^n)
- linux shell进行文件去重
- [笔记]利用归并排序计算逆序数的个数
- POJ 1321 棋盘问题
- 事务处理
- php接口测试 curl实现GET/POST
- 鸟哥私房菜学习笔记六 Bash
- 逆序对 (归并排序)