Article View: comp.sys.amiga.tech
Article #1546Wait() question answered!
From: Dale Larson
Date: Fri, 06 Oct 1989 14:06
Date: Fri, 06 Oct 1989 14:06
35 lines
1413 bytes
1413 bytes
I wish I could have found the answer in the docs somewhere, but louie was
kind enough to help me and here is his reply (I haven't tried it yet (am
at work) but don't doubt that it is correct). Thank you louie!
----
From louie@sayshell.umd.edu Fri Oct 6 06:06:24 1989
In article <3930@blake.acs.washington.edu> you write:
> Wait(timerport->mp_SigBit);
>This does not work (hangs), but
> WaitPort(timerport);
>does work properly.
Wait() takes a bit mask, not a signal bit number. So you should have used:
Wait(1L<<timerport->mp_SigBit);
To wait for more than one signal bit, just OR the bits together:
what = Wait((1L<<timerport->mp_SigBit) | (1L<<consoleport->mp_SigBit));
Wait() returns a bit mask of which signals occured and caused it to wake up.
louie
-----
--
A lack of prior planning on the part of any programmer
always constitutes an emergency.
Digital Teddy Bear dlarson@blake.acs.washington.edu
Technical Details
Message-ID:
<3935@blake.acs.washington.edu>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!usc!ucsd!ogccse!blake!dlarsonShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!usc!ucsd!ogccse!blake!dlarson From: dlarson@blake.acs.washington.edu (Dale Larson) Newsgroups: comp.sys.amiga.tech Subject: Wait() question answered! Keywords: Wait(), WaitPort(), timer.device Message-ID: <3935@blake.acs.washington.edu> Date: 6 Oct 89 14:06:53 GMT Organization: The Evergreen State College, WA Lines: 34