[comp.sys.amiga.tech] Monitors

valentin@cbmvax.UUCP (Valentin Pepelea) (10/27/89)

In article <220@egrunix.UUCP> cogswell@unix.secs.oakland.edu (Dan Cogswell) 
writes:
>
>I was informed of a cleaner way of doing it using Wait() and Signal().  To
>block a process, I do this:
>
>	FindTask(NIL)
>	AllocSignal(mask)                <-- clearing up, by Val.
>	put these things into a Node 
>	AddTail(mylist,mynode) 
>	Wait(mask).
>
>To wake-up a process, I do this:
>	
>	RemHead(mylist)
>	Signal(mynode.task,mynode.signal)
>	CleanThingsUp()

On the surface, this algorithm seems faulty, but it turns out to be good. Clean,
simple design. Congratulations.

>Well, if I knew what an "Amiga XMP" was, maybe I could answer that 
>question!  :-)  Care to fill us in??

I was only giving an example.

>(BTW, I'm undergradute and only a junior).  I may develop it into a shared
>library so all the world can benefit from my headaches. :-)

You are welcome to do so. I'll start working on the aspirin.library
immediately.

Valentin  :-)
-- 
"An  operating  system  without        Name:    Valentin Pepelea
 virtual memory is an operating        Phone:   (215) 431-9100
 system without virtue."               Usenet:  uunet!cbmvax!valentin
                                       Bitnet:  cbmvax!valentin@uunet.uu.net
         - Ancient Inca Proverb        Claimer: these aren't Commodore thoughts