home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 6877 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.2 KB  |  44 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: comp.vuw.ac.nz!HERMES!maths!peterm
  3. From: peterm@maths.grace.cri.nz (Peter McGavin)
  4. Subject: Re: AddIntServer + VERTB strangeness
  5.     <199603201423.OAA59524@poseidon.bfs.unibol.com><1011.6654T1057T1918@gramercy.ios.com>
  6.     <PETERM.96Apr1101437@tui.maths.irl.cri.nz>
  7.     <1550.6665T972T1664@gramercy.ios.com>
  8. Message-ID: <PETERM.96Apr4234146@tui.maths.irl.cri.nz>
  9. Date: 04 Apr 1996 11:41:46 GMT
  10. Organization: Industrial Research Ltd
  11. In-reply-to: larrymb@gramercy.ios.com's message of 1 Apr 1996 22:40:17 GMT
  12.  
  13. larrymb@gramercy.ios.com (Pacarana) writes:
  14. >>There is no safe way to temporarily take-over and restore the entire
  15. >>OS.
  16. >  Well, in my terminology using Disable/Forbid/OwnBlitter/etc. then your
  17. >direct hardware stuff is called temporarily taking over the OS. I think we
  18. >just have our terms crossed here. I didn't mean to say that you could start
  19. >using memory without AllocMem, take over the interuppts and copper or what not
  20. >and then start calling OS calls at random or expect to be able to safely
  21. >return to WB afterwards (if you did the absolute mem grab type stuff).
  22.  
  23. OK, but I feel I should make it clear that it is OS-illegal and unsafe
  24. to disable interrupts for "more than a very brief instant".
  25. "Disabling for more than 250 microseconds can interfere with normal
  26. operation of vital system functions."  --- Libraries RKM page 471.
  27. Similarly it is OS-illegal and unsafe to take over interrupts by
  28. directly poking hardware interrupt vectors.  One cannot expect OS
  29. calls to work if either of these practices is used.  Indeed, one
  30. cannot expect to restore normal system operations afterwards except by
  31. rebooting.  Third-party peripherals such as disk controllers and
  32. network cards often depend on their interrupts being serviced timely.
  33.  
  34. The safe, legal way to install interrupts is to use AddIntServer(),
  35. SetIntVector(), QBlit(), AddICRVector(), etc.  If anyone is worried
  36. about system overheads caused by interrupts not generated by yourself,
  37. then practically all of them can be eliminated by installing an
  38. input-handler and maybe adjusting task priorities.  It is still
  39. possible to exclusively allocate and bang other hardware, such as
  40. timers, custom gfx, ports, etc.
  41. -- 
  42. Peter McGavin.   (p.mcgavin@irl.cri.nz)
  43.  
  44.