home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.internals
- Path: sparky!uunet!gatech!concert!uvaarpa!murdoch!uvacs.cs.Virginia.EDU!asw2s
- From: asw2s@uvacs.cs.Virginia.EDU (Alex S. Waterman)
- Subject: Finding the state of a process from a DD.
- Message-ID: <1992Sep4.134242.10948@murdoch.acc.Virginia.EDU>
- Followup-To: asw2s@virginia.edu
- Sender: usenet@murdoch.acc.Virginia.EDU
- Organization: University of Virginia Computer Science Department
- Distribution: usa
- Date: Fri, 4 Sep 1992 13:42:42 GMT
- Lines: 29
-
- All,
- I have written a device driver for a sun-4, (SunOS 4.1.1),
- that communicates between a user and an attached Motorola MVME167
- board. The communication between the sun and the 167 is through
- a shared queue structure that resides in vme memory on the 167.
- When the 167 has some data for the sun it places it in
- our shared queue and sends an interrupt to the sun. This all works
- fine. When the sun receives the interrupt he sends a psignal() to
- the process who owns this data, the process will then do a read()
- to receive it.
- This is all fine except when the process for one reason or
- another has died and therefor can't except the signal. This data
- then sits at the front of the queue waiting to be read from a process
- that will never read it.
-
- Is there a way to tell if the process that this data is intended
- for is alive?? I have saved the pointer to the proc structure, and from
- this can get the pid.. Right now, I am just checking to make sure that
- this pid is the same as the pid of the process that initiated the first
- call to the 167 (that initiated the processing). It seems there must
- be an easier way. Thanks!
-
-
- Also, a related question: the device driver manuals state that peek()
- and poke() are only to be used from the DD's probe routine. Is there
- a similiar call that can be used to read/write a location from the
- other areas of the DD? Thanks again.
-
- - Alex Waterman
-