- 论坛徽章:
- 0
|
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 |
|