在uclinux啟動時有一個默認的初始線程
/*
* Initial thread structure
*
* We need to make sure that this is
* way process stacks are handled
*
*/
union thread_union init_thread_union
__attribute__ ((__section__(
INIT_THREAD_INFO(init_task)}
thread_union的定義在include/linux/shed
union thread_union {
struct thread_info thread_info
unsigned long stack[THREAD_SIZE/sizeof(long)]
}
其中THREAD_SIZE的定義在include/asm/thread_info
/*
* Size of kernel stack for each process
*/
#define THREAD_SIZE
此union中的thread_info這個結構體我們暫且不管(因為目前還不需要使用到它)
/*
* load the current thread pointer and stack
*/
r
r
r
r
r
sp = r
usp = sp
fp = sp
也就是說
猜想uclinux應該是把前面的啟動過程都當成一個特殊的線程看待
From:http://tw.wingwit.com/Article/program/net/201311/12009.html