Adding events to unsuspend a task (process) in a cooperative multitasking system can eliminate such polling. Event triggers can come from an an interrupt or another task. An example of such is OPEX for the AVR, in the AVRfreaks.net academy file archives. -----Original Message----- From: Dave VanHorn [mailto:dvanhorn@dvanhorn.org] Sent: Monday, September 06, 2004 11:11 AM To: Microcontroller discussion list - Public. Cc: avR-Chat@yahoogroups.com Subject: [AVR-Chat] Teenagers should write code. I just had one of those moments... :) I came to the realization that the cooperative multitasking model that I've used as the core of my applications for years, is nothing more than how a teenager behaves. When any chore is due: (system call to transmit a byte) First, find any possible reason NOT to do the chore. (Uart busy, Handshake asserted?) Second, see if it REALLY needs doing (anything to send?) If it absolutely can't be avoided, then do it. (start transmitting a byte, mark uart busy) As a result, my systems spend most of their time spinning in a loop, doing nothing. But, here is where they exhibit their most non-teenager behavior! They are always looking for something to do. But, that's only because they don't know anything else. Yahoo! Groups Links
Message
RE: [AVR-Chat] Teenagers should write code.
2004-09-07 by stevech
Attachments
- No local attachments were found for this message.