免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 966 | 回复: 0
打印 上一主题 下一主题

2410headers_study [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-03-05 23:25 |只看该作者 |倒序浏览
2410headers_study
1. “/include/asm”   and “/include/arm-asm” the two are the same, maybe a hardlink, maybe a copy.
2.”/asm/hardware.h” and “asm/arch-s3c2410.h”, different
3.in my led driver, there is a line:
ret = register_chrdev(major, NAME, &led_test_fops);
it works perfectly, but how can it works where is his detailed defination?
I search around the whole kernel, only in fs.h there is one line:
extern int register_chrdev(unsigned int, const char *,
      struct file_operations *);
but in my eyes this is only a declaration not defination, I mean how it handle all its argumnets,
like:
peter(int x, int y)
{
int z;
z=x+y;
return z;
}
4. I am confused, may be register_chardev works the same way like printk. Mybe the defination is in the C compilfier, can not be!~
5. #ifndef __arch_ioremap
#define ioremap(cookie,size)  __ioremap(cookie,size,0,1)
#define ioremap_nocache(cookie,size) __ioremap(cookie,size,0,1)
#define ioremap_cached(cookie,size) __ioremap(cookie,size,L_PTE_CACHEABLE,1)
#define iounmap(cookie)   __iounmap(cookie)
in io.h, I find many macros defined like above.
and you can never find the difination of these "__"factions in /include
who are they? i think they are offered by kernel,the buttom of kernel.

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/56913/showart_490182.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP