Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/21/01 20:54
Read: times


 
#12704 - RE: Return vector for interrupts
Erik,

Writing a preemptive scheduler requires it to save the old context so it can switch to a different process. The interrupt to do this would be the clock interrupt used by the scheduler.

Also, I once did a scsi controller that used an immediate context switch within an interrupt routine for certain very critical (but long) operations when a specific command came in a mailbox (which generates an interrupt.) This worked very well.

But, I agree that in general, tampering with an interrupt's context is rarely to be done and is reserved for certain critical functionalities. But it is a necessity for a preemptive system. Yet, most programs can be done without a preemptive scheduler.

<>< Lance.


erik malund wrote:
-------------------------------
The disable of the interrupts is needed in ALL cases if you have higher priority interrupts enabled. The use of R0 or R1 as suggested by San would make that register unusable for main code. However, if this interrupt is high priority or all interrupts are low priority, you may skip the disable. Now, as far as I'm concerned, any interrupt that need to know where the main program is is an indication of bad design. I would like for once to be disproven on that one.

Have fun,

Erik

List of 14 messages in thread
TopicAuthorDate
Return vector for interrupts            01/01/70 00:00      
RE: Return vector for interrupts            01/01/70 00:00      
RE: Return vector for interrupts            01/01/70 00:00      
RE: Return vector for interrupts            01/01/70 00:00      
RE: Return vector for interrupts            01/01/70 00:00      
RE: Return vector for interrupts            01/01/70 00:00      
RE: Return vector for interrupts            01/01/70 00:00      
RE: Return vector for interrupts            01/01/70 00:00      
RE: Return vector for interrupts            01/01/70 00:00      
RE: Return vector for interrupts            01/01/70 00:00      
RE: Return vector for interrupts            01/01/70 00:00      
RE: Return vector for interrupts            01/01/70 00:00      
RE: Return vector for interrupts            01/01/70 00:00      
RE: Return vector for interrupts            01/01/70 00:00      

Back to Subject List