[comp.sys.mac] VBL tasks, time manager

jmm@thoth30.berkeley.edu.BERKELEY.EDU (09/30/87)

1.  Can someone send me some example code of
VBL tasks (preferably in LSPascal, but
I can also read C )?  I was playing around
with them last night and managed to
produce some pretty graphics and sound
8-) but nothing useful.

(Even if you don't have example code,
I'd be interested to know what you do
with VBL interrupts.  It seems as if
the 'no memory manager' restriction
is a big problem)

2.  Someone told me (once, a long time ago...) that the time
manager has bugs and shouldn't be used.
True, false, or somewhere in the middle?

James Moore

tim@hoptoad.uucp (Tim Maroney) (10/01/87)

In article <5273@jade.BERKELEY.EDU> jmm@thoth30.berkeley.edu () writes:
>1.  Can someone send me some example code of
>VBL tasks (preferably in LSPascal, but
>I can also read C )?  I was playing around
>with them last night and managed to
>produce some pretty graphics and sound
>8-) but nothing useful.
>
>(Even if you don't have example code,
>I'd be interested to know what you do
>with VBL interrupts.  It seems as if
>the 'no memory manager' restriction
>is a big problem)

Sorry, but I'd be fired if I broadcast proprietary code.  However, what I
use the vertical retrace for is resending packets and noticing the user
timeout in the networking protocol TCP.  There is no need for storage
allocation in either of these operations.  For interrupt-level code that
does need to allocate storage (e.g., network packet reception from a socket
listener), I pre-allocate it at the synchronous level and queue the blocks
up for later use.
-- 
Tim Maroney, {ihnp4,sun,well,ptsfa,lll-crg}!hoptoad!tim (uucp)
hoptoad!tim@lll-crg (arpa)3