All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Haynes <simon@baydel.com>
To: root@chaos.analogic.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: File access
Date: Tue, 19 Aug 2003 10:53:46 +0100	[thread overview]
Message-ID: <1FDBD34B76B1@baydel.com> (raw)
In-Reply-To: <Pine.LNX.4.53.0308140803430.179@chaos>

I actually had a character interface which I use for on the fly 
configuration. I have now implemented some code which uses a user process to 
pass the configuration to the driver. I have however run into problems trying 
to write files from the driver. I have tried implementing a user process 
which performs a blocking read. The user process is blocked with 
interruptible_sleep_on and is woken by the main part of the driver when it 
needs to write. The problem is I then need to stall the main part of the 
driver while the data gets written out. My problem is that this write needs 
to happen from an interrupt handler or a timer process. I cannot seem to 
block these with interruptible_sleep_on, the kernel crashes. I guess you 
cannot use this in these cases ? I have also tried semaphores without much 
success. I have looked for the howto but failed there also. 

Could you please tell me where I could find this FAQ.

Many Thanks

Simon.




On Thursday 14 Aug 2003 1:07 pm, Richard B. Johnson wrote:



> On Thu, 14 Aug 2003, Simon Haynes wrote:
> > I am currently developing a module which I would like to configure
> > via a simple text file.
> >
> > I cannot seem to find any information on accessing files via a kernel
> > module.
> >
> > Is this possible and if so how is it done ?
> >
> > Many Thanks
> >
> > Simon.
>
> This has become a FAQ. You make your module accept parameters
> from an ioctl(). Then you use a user-mode task to read file(s)
> and configure your module.
>
>
> Cheers,
> Dick Johnson
> Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips).
>             Note 96.31% of all statistics are fiction.

  reply	other threads:[~2003-08-19 10:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-14 11:32 File access Simon Haynes
2003-08-14 12:07 ` Richard B. Johnson
2003-08-19  9:53   ` Simon Haynes [this message]
2003-08-19 12:17     ` Richard B. Johnson
2003-08-19 13:36       ` Simon Haynes
2003-08-19 15:01         ` Richard B. Johnson
2003-08-14 12:19 ` Matti Aarnio
2003-08-14 12:28   ` Muli Ben-Yehuda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1FDBD34B76B1@baydel.com \
    --to=simon@baydel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=root@chaos.analogic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.