home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / internal / 1771 < prev    next >
Encoding:
Text File  |  1992-09-04  |  1.8 KB  |  46 lines

  1. Newsgroups: comp.unix.internals
  2. Path: sparky!uunet!psgrain!hippo!ucthpx!aim1!aim1!gram
  3. From: gram@aim1.aztec.co.za (Graham Wheeler)
  4. Subject: Re: The STREAMS scheduler
  5. Message-ID: <gram.715599461@aim1>
  6. Organization: Aztec Information Management
  7. References: <gram.714739169@aim1> <gram.714839766@aim1>
  8. Date: Fri, 4 Sep 1992 09:37:41 GMT
  9. Lines: 35
  10.  
  11. gram@aim1.aztec.co.za (Graham Wheeler) writes:
  12.  
  13. >Anyway, the trick was that there is a service request value in the
  14. >dual port memory as well, which is set by the card to hex FF when it
  15. >has handled the last request. So I now check this as well, and everything
  16. >seems to be fine.
  17.  
  18. It turned out that this was *not* the case. Even though this fix worked,
  19. it shouldn't have! In the end, I scrapped the write-side service, put all
  20. the messages on my own singly linked list, and do the write side service
  21. from within the interrupt handler. So the interrupt handler looks like:
  22.  
  23.     ipibintr() {
  24.         ind = dualPort->ind;
  25.         status = dualPort->status;
  26.         switch (ind) {
  27.             /* Interrupt type-specific processing */
  28.         }
  29.         if (data waiting to be retrieved from card)
  30.             retrieve data;
  31.         if (card RPC not busy and message on list) 
  32.             remove message from list and do RPC;
  33.     }
  34.  
  35. It still locks up now and then, but I think that is a timing problem due
  36. to the use of spinlocks when retrieving data from the card. The RPC interface
  37. to the card is being redesigned to remove the spinlocks, and I will see what
  38. happens after that. I have removed the calls to splstr, as the consensys
  39. seems to be that this is not a Good Thing.
  40.  
  41. -- 
  42. Graham Wheeler                     | "That which is weak conquers the strong,
  43. Software Systems Engineer/Student  | that which is soft conquers the hard."
  44. Aztec Information Management/UCT   |         Lao Tzu - Tao Te Ching Ch. 78
  45. gram@aim1.aztec.co.za / gram@cs.uct.ac.za 
  46.