lkml.org 
[lkml]   [1999]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRE: Rio filesystem

On 22-Oct-99 Steven_Hazel@trilogy.com wrote:
> So you're saying the best way to handle this is to just do direct hardware
> access from within the filesystem code? My biggest practical problem with
> this is that it would require a version of mount which knows how to pass it
> the appropriate parallel port info.

That's easy: mount -o lpio=0xXXX /dummy /mnt/rio
Your filesystem will see the mount options as a string, which you can parse in
any way you like. BTW, can you not use the standard printer port driver?

> Yeah, I need to just pause for a few milliseconds between parallel port
> control operations. I've been (ab)using udelay, which has the
> disadvantages that my delay times vary unacceptably much from system to
> system and that it locks the system for frequent milliseconds-in-length
> intervals during file transfers, which isn't acceptable. Blocking sleep
> definitely sounds like the right way to go -- any idea where I can find
> info on linux's provisions for doing this?

There's a thread on linux-kernel about this right now. See "schedule_timeout()
semantics/usage?". A quick summary:

Andrea Arcangeli <andrea@suse.de>:
> So the right way to unconditionally wait for 5 sec _if_ you are not
> registered in any waitqueue and so if you can't be wakenup from a kernel
> event (that is not a signal) is:
>
> __set_current_state(TASK_UNINTERRUPTIBLE);
> schedule_timeout(5*HZ);

This restricts you to HZ resolution (often 100Hz, 10ms), which may be too
coarse for you.

J

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.288 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site