Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!ucla-cs!michael From: michael@maui.cs.ucla.edu Newsgroups: comp.unix.wizards Subject: Unix kernel calling the kernel Message-ID: <17200@shemp.CS.UCLA.EDU> Date: 26 Oct 88 01:41:51 GMT Sender: news@CS.UCLA.EDU Reply-To: michael@CS.UCLA.EDU () Organization: UCLA Computer Science Department Lines: 24 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