XENIX.. speed up of /dev/port .. (Getting the INODE)

Steve Dyer dyer at spdcc.COM
Sat Jan 7 09:42:26 AEST 1989


In article <6552 at pogo.GPID.TEK.COM> curtj at pogo.GPID.TEK.COM (Curt ) writes:
>I have 1.2 Meg, to send down through an I/O port.  Since I have to to
>an 'lseek' every time I wish to send a byte down to a specific port
>address, it takes an astronomical amount of time to send the data.
>Is there any way to cause READ/WRITE to NOT update the file pointer address
>when you execute them.  If not, HOW DO I GET HOLD OF THE i-node so that I
>can reset the file pointer to the proper address every time I issue a
>READ/WRITE.  I am trying to cut down the system call overhead.

Sounds like you're ready to graduate to a REAL device driver.
Believe me, you shouldn't be too concerned by the time being consumed
by the extra lseeks, which are very fast, anyway; the byte-at-a-time
paradigm is burning you as badly.  There really isn't a way to
"get hold of the i-node" (file pointer, actually) from userspace
to make the lseeks unnecessary; at least, no way more efficient than
just doing the lseeks.

If your device is a simple IO port with no capability of generating an
interrupt, a device driver is VERY simple (hell, it's simple anyway.)
The SCO documentation has a chapter on writing device drivers, with
examples for boilerplate.

-- 
Steve Dyer
dyer at ursa-major.spdcc.com aka {ima,harvard,rayssd,linus,m2c}!spdcc!dyer
dyer at arktouros.mit.edu



More information about the Comp.unix.xenix mailing list