home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!usenet-feed.cc.umr.edu!mcs213b.cs.umr.edu!quandt
- From: quandt@mcs213b.cs.umr.edu (Brian Quandt)
- Subject: task communication and forbid()
- Date: Fri, 18 Dec 1992 05:51:55 GMT
- Nntp-Posting-Host: mcs213b.cs.umr.edu
- Organization: University of Missouri - Rolla
- Sender: cnews@umr.edu (UMR Usenet News Post)
- Message-ID: <1992Dec18.055155.18152@umr.edu>
- Lines: 25
-
- I have a question on how to communicate from a subtask to the parent.
- The main problem is that I need to call forbid so that I can
- ensure that I get timely response during the while loop. Is it
- legit to use globals? Is there any special way that these
- globals need to be declared (memory model) ? I know that task
- communication via globals and assumed constant memory addresses
- is ugly but it seems to be the correct way on the amiga. Is it?
- Is there a better way?
-
- {
- CreateTask( some task that reads keyboard input and sets globalKILL
- appropriatly )
-
- forbid();
-
- while(!globalKILL)
- {
-
- }
-
- permit();
- }
-
-
-
-