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