contigmalloc() and mmap()

2005-06-13 Thread Apache Xie
I have some experiences in writing Linux device driver, but I am new to FreeBSD kernel, although from the first glimpse, there seems no big differences between the kernel operations a char device driver can use, but I met some problems when the driver is running in FreeBSD. Our device is an exper

Re: contigmalloc() and mmap()

2005-06-13 Thread Apache Xie
From: Mark Tinguely <[EMAIL PROTECTED]> To: [EMAIL PROTECTED], freebsd-hackers@freebsd.org Subject: Re: contigmalloc() and mmap() Date: Mon, 13 Jun 2005 07:41:33 -0500 (CDT) > I browsed kernel tree, I found those drivers which use contigmalloc() and > contigfree() always call these two ker

Re: contigmalloc() and mmap()

2005-06-15 Thread Apache Xie
I'm unsure about this usage of the timer (callout(?) ) how does the timer know which buffer pages to remove? and if each userspace process does an ioctl to allocate a different buffer, are the new pages also visible to other processes? Use mmap() we can ensure different process access differ

How to use "offset" parameter in mmap() system call

2005-09-28 Thread Apache Xie
Hi, I wrote a device driver, it supports mmap(), but I met some problems recently, it seems relate to the "offset" parameter in mmap() system call, what I want to get help are: How to use the offset parameter of mmap() correctly? Can it be used freely? My driver is a char device driver, when it