这总是让我感到困惑.我克隆了这个
git clone https://android.googlesource.com/kernel/msm.git
Run Code Online (Sandbox Code Playgroud)
它似乎是克隆解析和接收对象等很长时间.然后当它完成......
git clone https://android.googlesource.com/kernel/msm.git
Cloning into msm...
remote: Counting objects: 1636832, done
remote: Total 1636832 (delta 1367313), reused 1636832 (delta 1367313)
Receiving objects: 100% (1636832/1636832), 324.89 MiB | 331 KiB/s, done.
Resolving deltas: 100% (1367314/1367314), done.
Run Code Online (Sandbox Code Playgroud)
我打开msm目录找空.这发生在以前.任何人都有一个关于出了什么问题的解释?
代码如下,似乎没有任何问题.我的gcc找不到alloc.h
print(node *q)
39 {
40 node *p=q;
41 do
42 {
43 printf("%d",p->n);
44 if(p->ptr != NULL)
45 p=p->ptr;
46 else
Run Code Online (Sandbox Code Playgroud)
(gdb)pp $ 1 =(node*)0x0
分配内存的代码是
if(p== NULL)
{
p=(node *)malloc(sizeof(node));
if(p== NULL)
printf("The malloc failed\n");
p->n=num;
p->ptr=NULL;
}
Run Code Online (Sandbox Code Playgroud)
当我在调试器中运行它时,没有malloc消息失败.
谁能帮忙.问候
Sraddha
add(node **q)
{
node *p=*q;
int num;
printf("Enter the number you want to add");
scanf("%d", &num);
if(p== NULL)
{
p=(node *)malloc(sizeof(node));
if(p== NULL)
printf("The malloc failed\n");
p->n=num;
p->ptr=NULL;
}
}
Run Code Online (Sandbox Code Playgroud) 我正在阅读网络设备驱动程序代码.我的驱动程序遵循driver-model.REF:kernel/Documentation/driver-model.通过interface.txt读取:{Device interfaces是设备类的逻辑接口,直接与用户空间接口相关,如设备节点.每个接口都在其所属的设备类的目录中被赋予一个目录.}
还没有能够确切地确定接口.所以在通过struct net_device和interface.txt文件中的Programming接口(kernel./Documentation/driver-model)后,我再次得出结论,这些人的net_device是谈论.现在我想知道的是TCP/IP堆栈物理和链路层是网络驱动程序.我想给我的网络驱动程序提供给我的tcp/ip堆栈的接口.问题是如何?如何将net_device结构提供给TCP/ip堆栈.有谁知道这件事.关心Sraddha
.