Unix kernel calling the kernel

michael at maui.cs.ucla.edu michael at maui.cs.ucla.edu
Wed Oct 26 11:41:51 AEST 1988


I need to know how a part of the unix kernel can call another part of the
kernel (in particular, open(), read(), write(), close).

Specifically, I am planning to write a device driver for a block device
that would read the data from a tty device (Actually a psuedu tty who's
other end is another device driver--yet another fun thing to worry
about).

The system is a system 5 release 2 (Unix Pc 3.51a)
The open() call can be done at device initial open, the close() at
device initial close, but the strategy routine will need to call read
and write multiple times (I need to transfer 512 bytes of data, but the
tty buffers have a limit of 255 chars. I was planning on 8 calls of 64
bytes each). Not to mention one more write to tell the other end what
it is that I want them to do.

Now, the obvious way of just calling "read()" will fail with a recursice
TRAP inside the kernel. But there is no "open", or "read" routine defined
in the kernel's name list.

Between process accounting and core file creation, I know that it can
be done, but I do not know how.

			Michael



More information about the Comp.unix.wizards mailing list