🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #2980

Re: Wait()ing Peacefully

#2980
From: Elise Tarrant
Date: Fri, 16 Mar 1990 03:08
23 lines
1218 bytes
> bdiscoe writes:
> 
> Msg-ID: <1990Mar16.214401.1738@spectre.ccsf.caltech.edu>
> Posted: 16 Mar 90 21:44:01 GMT
> 
> Org.  : California Institute of Technology
> Person: Ben W. Discoe
> 
> How do you Wait() on several ports simultaneously?  I know how to wait on,
> say, the serial device, console device and an IDCMP individually, but what
> I really need to do is wait on a message from any one of them.
> 
> I tried:  waitflags = <port 1's bit> | <port 2's bit> |.... ;
>           Wait(waitflags);
> but this didn't seem to work.
> 
> -Ben "But I READ the manual!  Honest!"

You almost had it. Instead of trying to or the bits into one flag
to wait for, set up two flags and then or in the call to wait(), like this.
wait1flag = <port 1's mp_SigBit>;
wait2flag = <port 2's mp_SigBit>;
wait(wait1flag | wait2flag);
Technical Details
Message-ID: <1322@mindlink.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!philmtl!atha!aunro!alberta!ubc-cs!van-bc!rsoft!mindlink!a1406

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!philmtl!atha!aunro!alberta!ubc-cs!van-bc!rsoft!mindlink!a1406
From: a1406@mindlink.UUCP (Elise Tarrant)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Wait()ing Peacefully
Message-ID: <1322@mindlink.UUCP>
Date: 16 Mar 90 03:08:58 GMT
Organization: MIND LINK! - British Columbia, Canada
Lines: 23