[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.61.0701122329000.19224@yvahk01.tjqt.qr>
Date: Fri, 12 Jan 2007 23:31:29 +0100 (MET)
From: Jan Engelhardt <jengelh@...ux01.gwdg.de>
To: "linux-os (Dick Johnson)" <linux-os@...logic.com>
cc: Erik Mouw <erik@...ddisk-recovery.com>,
Jesper Juhl <jesper.juhl@...il.com>,
congwen <congwen@...il.com>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: How can I create or read/write a file in linux device driver?
On Jan 12 2007 09:27, linux-os (Dick Johnson) wrote:
>
>First, since file-operations require process context, and the kernel
>is not a process, you need to create a kernel thread to handle your file
>I/O.
Not always. If you do file I/O as part of a device driver, you are fine.
quad_dsp is such an example, where writing to /dev/Qdsp_* will trigger writes
to /dev/dsp and /dev/adsp.
>Once you set up this "internal environment," you use the appropriate
>kernel function(s) such as sys_open()
What against filp_open? That avoids the unnecessary getname() stuff in most
syscalls.
-`J'
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists