home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / amiga / programm / 17507 < prev    next >
Encoding:
Text File  |  1992-12-20  |  1.1 KB  |  37 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!usenet-feed.cc.umr.edu!mcs213b.cs.umr.edu!quandt
  3. From: quandt@mcs213b.cs.umr.edu (Brian Quandt)
  4. Subject: task communication and forbid()
  5. Date: Fri, 18 Dec 1992 05:51:55 GMT
  6. Nntp-Posting-Host: mcs213b.cs.umr.edu
  7. Organization: University of Missouri - Rolla
  8. Sender: cnews@umr.edu (UMR Usenet News Post)
  9. Message-ID: <1992Dec18.055155.18152@umr.edu>
  10. Lines: 25
  11.  
  12. I have a question on how to communicate from a subtask to the parent.
  13. The main problem is that I need to call forbid so that I can
  14. ensure that I get timely response during the while loop.  Is it
  15. legit to use globals?  Is there any special way that these
  16. globals need to be declared (memory model) ?  I know that task
  17. communication via globals and assumed constant memory addresses
  18. is ugly but it seems to be the correct way on the amiga.  Is it?
  19. Is there a better way? 
  20.  
  21.  {
  22.  CreateTask( some task that reads keyboard input and sets globalKILL
  23.          appropriatly )
  24.  
  25.  forbid();
  26.  
  27.  while(!globalKILL)
  28.     {
  29.         
  30.      }
  31.  
  32.  permit();
  33.  }
  34.  
  35.  
  36.  
  37.