[comp.sys.amiga.tech] lots o' ports

bader+@andrew.cmu.edu (Miles Bader) (08/10/88)

The Wait() call takes a bit mask of signal #'s to wait for; what happens when
you have more than 32 message ports, each with (I assume) a unique signal #?

Seems sort of like what happend to berkley with select masks...

-Miles

jimm@amiga.UUCP (Jim Mackraz) (08/11/88)

In article <UWzqYGy00ja1M0dlF2@andrew.cmu.edu> bader+@andrew.cmu.edu (Miles Bader) writes:
)The Wait() call takes a bit mask of signal #'s to wait for; what happens when
)you have more than 32 message ports, each with (I assume) a unique signal #?
                                                 ^^^^^^^^^
						 bingo.

There you go: use the same signal for some ports, and poll those ports
whenever the signal is received.  I can't imagine the application that
would have 16 ports (by the way, you get only 16 USER signals, and 
various aspects of the system allocate those if you aren't careful,
such as Intuition's IDCMP.), so I can only hope that some of the ports
expect less traffic than others.  Group those.

You can do this by initializing your own ports (don't forget NewList())
around signals you allocate yourself.

You can poll a port by GetMsg(), which returns NULL if nothing is there.
You can use standard list techniques if you want to check without
getting.  I believe GetMsg() has very low overhead.


)Seems sort of like what happend to berkley with select masks...

These limits do crop up.  My Berkely knowledge is ancient: can you
hand munge your file descriptors or whatever to share bits in the
mask similar to what I describe here?

Wait 'till you see what we do to extend the 32 IDCMP classes.

)-Miles

	jimm
-- 
	Jim Mackraz, I and I Computing	  
	amiga!jimm	BIX:jmackraz
Opinions are my own.  Comments regarding the Amiga operating system, and
all others, are not to be taken as Commodore official policy.