home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!think.com!rpi!ghost.dsi.unimi.it!univ-lyon1.fr!taloa.unice.fr!beust
- From: beust@aurora.unice.fr (Cedric Beust)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: RKM description of WaitPort()
- Date: 4 Jan 1993 11:53:59 +0100
- Organization: University of Nice Sophia-Antipolis, France
- Lines: 30
- Distribution: world
- Message-ID: <1i9507INN2gl@aurora.unice.fr>
- References: <1993Jan1.221013.26070@urbana.mcd.mot.com> <hebrais.10x6@mirkwood.CAM.ORG>
- NNTP-Posting-Host: aurora.unice.fr
-
-
- In article <hebrais.10x6@mirkwood.CAM.ORG>, hebrais@mirkwood.CAM.ORG (Philippe
- Hebrais) writes:
- >[ qbarnes@urbana.mcd.mot.com (Quentin Barnes) writes in article
- ><1993Jan1.221013.26070@urbana.mcd.mot.com>: ]
- >>I was reading the description of the WaitPort() call in the RKM:Libraries
- >>and was confused by the description. On page 504, it says:
- >>
- >> ... It is possible to receive a signal for a port without
- >> a message being present yet. The code processing the
- >> messages should be able to handle this. ...
- >>
- >>do this. What am I missing? What does the documentation actually
- >>saying?
- >
- >It is trying to say that when a signal is received, any number of
- >messages may have arrived, including zero. You should loop on
- >GetMsg( port) until it returns NULL. That "yet" is a word too many.
-
- If that doesn't make sense to you (Quentin), just think that the OS may
- not be the only one that sends a signal to your task. Even though sending
- a lonely signal without any messages may seem strange, it can happen (blankers
- used to work this way). So you must handle the case, simply by checking that
- GetMsh() returns a non-NULL value.
-
- --
- Cedric BEUST, beust@sa.inria.fr, Bull Research Koala proj, KoalaBus & xforum
- Pho:(33) 93.65.78.07(.66 Fax), INRIA, B.P.93 - 06902 Sophia Antipolis, FRANCE.
-
-
-