Re: [問題] 問一個傳遞參數的問題..
1055 struct file_operations {
......
1067 int (*mmap) (struct file *, struct vm_area_struct *);
.....
1085 };
以上 kernel source code 中file_operation 的 mmap proto type
而從user space 呼叫的 proto type
void *mmap (void *__addr, size_t __len, int __prot,
int __flags, int __fd, __off_t __offset) __THROW;
兩者是不一樣的...
※ 引述《rz600000 (冏冏人)》之銘言:
: 我記得很久前有在某個地方看過
: 但是一直找不到我在哪裡看過
: 就是 今天假如一個mmap function
: static int xxx_mmap (struct file *file, struct vm_area_struct *vma)
: 裡面的file 跟 vma 參數是怎麼樣產生的
: 我知道跟user space 所傳遞的參數是不一樣的
: 但是那兩個參數是怎麼出現的
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 125.230.64.84
→
06/07 22:22, , 1F
06/07 22:22, 1F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):
LinuxDev 近期熱門文章
PTT數位生活區 即時熱門文章