s3c44b0的blob中的command链表问题,请版主帮忙解答
- UID
- 133947
- 性别
- 男
|
commandlist_start是command的列表的首地址,每一个command表项都有相同的commandlist_t型结构,它们在分布于内存中.
commands = (commandlist_t *) &__commandlist_start;
//相当于把_commandlist_start的值赋给commands,同时把commands所指向的区域转化为commandlist_t型. lastcommand也类似.
cmd = next_cmd = commands;
//这个就不说了,赋值.
next_cmd++;
//这个自加所加的地址数是 commandlist_t的长度...
while(next_cmd < lastcommand) {
cmd->next = next_cmd;
cmd++;
next_cmd++;
}
//这个循环就相当于cmd 和 next_cmd一前一后,把commandlist的各个表项接起来(cmd->next = next_cmd).直到到达command表项的未尾:next_cmd < lastcommand.
整个实现的过程,就好像常用莲表里的一些操作,不知你搞明白了没有. 所以函数的功能就是将__commandlist_start 到__commandlist_end之间的内存链接起来 |
51 c8051f(f020,f040) msp430 arm(2410,2510) fpga(xc3s4000) dsp(5116 dm642) keilc vc++ matlab linux protel Ten_layerPCB mpegx h.26x Rscode Turbocode ofdm VideoBroadcasting ldpc_code(now!) |
|
|
|
|
|
- UID
- 133947
- 性别
- 男
|
51 c8051f(f020,f040) msp430 arm(2410,2510) fpga(xc3s4000) dsp(5116 dm642) keilc vc++ matlab linux protel Ten_layerPCB mpegx h.26x Rscode Turbocode ofdm VideoBroadcasting ldpc_code(now!) |
|
|
|
|
|
- UID
- 133947
- 性别
- 男
|
我是这样理解的, __commandlist_start就像是一个类似变量的参数(),它的存储指向列表的首地址,所以&__commandlist_start就获得了列表的首地址,也就是__commandlist_start的存储地址.(图片在那?) |
51 c8051f(f020,f040) msp430 arm(2410,2510) fpga(xc3s4000) dsp(5116 dm642) keilc vc++ matlab linux protel Ten_layerPCB mpegx h.26x Rscode Turbocode ofdm VideoBroadcasting ldpc_code(now!) |
|
|
|
|
|
- UID
- 133947
- 性别
- 男
|
51 c8051f(f020,f040) msp430 arm(2410,2510) fpga(xc3s4000) dsp(5116 dm642) keilc vc++ matlab linux protel Ten_layerPCB mpegx h.26x Rscode Turbocode ofdm VideoBroadcasting ldpc_code(now!) |
|
|
|
|
|