🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: A bug in ARP 1.3?

#13090
From: Jeff Bevis
Date: Thu, 14 Dec 1989 16:42
23 lines
1751 bytes
In article <148@bucsb.UUCP>, castong@bucsb.bu.edu (paul castonguay) writes:
>What does the following line mean?
>
>    Wait(1 << Window->UserPort->mp_SigBit)
>
Actually, the '1<<N' means "shift 1 to the left by N bits," which can be
interpreted as a multiplication by 2^N.  Having said that, the result of
this expression probably will be much clearer.  The mp_SigBit is the bit
*number* of the signal bit assigned to this message port, which you will
Wait() on for messages.  You can wait on one or many signals simultaneously
by passing a bit *mask* (or, in exec-ese, a mask of *flags*) to Wait().
However, sing mp_SigBit is not a *mask* (ie, a single 1 in a longword of 0's),
you need to convert it to such, and then pass it to Wait().  That is what
the line in question does.  Then, exec causes your task to be suspended
until that signal bit becomes active (ie, a message is sent to your window's
message port), and then you awaken.

Hope this helps.

+--------------------------------+--------------------------------------------+
| Jeff Bevis 		         | "But I don't like spam!"		      |
| bevis@en.ecn.purdue.edu	 | 	     Give me Amiga or nothing at all. |
+--------------------------------+--------------------------------------------+
Technical Details
Message-ID: <8912141642.AA05532@en.ecn.purdue.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!zaphod.mps.ohio-state.edu!usc!ucsd!ucbvax!EE.ECN.PURDUE.EDU!bevis
References: <148@bucsb.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!zaphod.mps.ohio-state.edu!usc!ucsd!ucbvax!EE.ECN.PURDUE.EDU!bevis
From: bevis@EE.ECN.PURDUE.EDU (Jeff Bevis)
Newsgroups: comp.sys.amiga.tech
Subject: Re: A bug in ARP 1.3?
Message-ID: <8912141642.AA05532@en.ecn.purdue.edu>
Date: 14 Dec 89 16:42:32 GMT
References: <148@bucsb.UUCP>
Sender: daemon@ucbvax.BERKELEY.EDU
Organization: Purdue University Engineering Computer Network
Lines: 23