Re: Which inode pointer do I should use?

2007-07-30 Thread Dave Young
>On 7/29/07, Diego Woitasen <[EMAIL PROTECTED]> wrote: > Hi, > recently I post a patch to remove the lock_kernel() in the > ioctl() of drivers/block/loop.c. After that Andrew Morton add a > a change where he gets the inode pointer from > file->f_mapping->host, needed

Re: Reading flags from device driver "open" call

2007-07-30 Thread Erik Mouw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, Jul 30, 2007 at 09:35:29AM -0500, [EMAIL PROTECTED] wrote: > I am writing a block device driver for an SD card accessed over SPI. If the > card is write-protected (using the little switch on the side), I would like > to inform the kernel that

Reading flags from device driver "open" call

2007-07-30 Thread beck0778
Hello, I am writing a block device driver for an SD card accessed over SPI. If the card is write-protected (using the little switch on the side), I would like to inform the kernel that the device is read-only, and can't be written to. After a bit of research, I've come to the conclusion that

Re: Unmap pages from a VMA

2007-07-30 Thread Thomas Petazzoni
Hi, Thanks for your answer. Le Mon, 30 Jul 2007 17:01:43 +0530, Vivek Kutal <[EMAIL PROTECTED]> a écrit : > You could just reset the present bit of the pages that you want to > remap. Now the next access to these pages will generate a fault and > your nopage() will be called. And how would you

Re: Unmap pages from a VMA

2007-07-30 Thread Vivek Kutal
Thomas Petazzoni wrote: Hi, The nopage() method of a VMA is called when a page fault occurs on that VMA, and this method allows the driver being mmap()ed which page should be mapped at the fault address. Works nicely. However, how can the driver unmap some pages of a VMA, so that at the next ac

Re: pthreads

2007-07-30 Thread Andrea Gasparini
>   i am porting user code as kernel code.in user code pthreads is used i > want respective in kernel.pthread_mutex_t and PTHREAD_MUTEX_INITIALIZER > is used in user code you can try using the Big Kernel Lock. :D Bye! -- -gaspa- --- - Powered

pthreads

2007-07-30 Thread hari krishna angadi
hi, i am porting user code as kernel code.in user code pthreads is used i want respective in kernel.pthread_mutex_t and PTHREAD_MUTEX_INITIALIZER is used in user code Send instant messages to your online friends http://uk.messenger.yahoo.com