Re: [PATCH 1/1] UIO: Add a write() function to enable/disable interrupts

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Thomas Gleixner
Date: Saturday, May 24, 2008 - 3:22 pm

On Fri, 23 May 2008, Greg KH wrote:


It makes a certain amount of sense to use write. You hold the device
file descriptor anyway for the read (wait for interrupt) operation,
so using the same file descriptor is not a too bad idea:

    while (!stop) {

        /* wait for interrupt */
	read(fd);

	do_stuff();

	/*reenable interrupt */
	write(fd);
    }

I thought about using a sysfs entry for a while, but looking at the
actual use case made the write() solution a more natural choice.

Thanks,

	tglx
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 1/1] UIO: Add a write() function to enable/disa ..., Thomas Gleixner, (Sat May 24, 3:22 pm)