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

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!lysator.liu.se!cmh
  3. From: cmh@lysator.liu.se (Magnus Holmgren)
  4. Subject: Re: WShell: Hangning forbid!
  5. Message-ID: <Bz7ysq.Lw6@lysator.liu.se>
  6. Organization: Lysator Academic Computer Society, Linkoping University, Sweden
  7. References: <1992Dec12.143541.21468@sth.frontec.se>
  8. Date: Sun, 13 Dec 1992 22:36:25 GMT
  9. Lines: 30
  10.  
  11. bjst@sth.frontec.se (Bjorn Stenberg) writes:
  12.  
  13.  
  14. >A while ago there was some talk about process syncronization when
  15. >multithreading, and Randell Jesup suggested doing:
  16.  
  17. >   ...
  18. >   Forbid();
  19. >   Signal(parent,sig);     // tell parent we exited
  20. >}
  21.  
  22. >to make sure the child has exited before any other process gets a time slice.
  23.  
  24. >Well, I do this in a child of mine, but after the parent exits WShell
  25. >complains with the message:
  26.  
  27. >***Hanging forbid!
  28.  
  29. >Is WShell just being paranoid or am I doing something wrong? (I'm not supposed 
  30. >to Permit() or anything in the parent, am I?)
  31.  
  32. In a sense, WShell is paranoid, but I find these kinds of messages useful.
  33. However, if you code assembler, there is a way around this. Instead of
  34. just exit your program with an rts, make a jmp _LVOPermit(a6). This way,
  35. WShell will not complain, and the rts that exits your program is in the
  36. Kickstart, so even if the child would unload some code, there is no
  37. problem.
  38. -- 
  39.  Magnus Holmgren | Email: cmh@lysator.liu.se, cmh@augs.se | FIDO: 2:204/404.6
  40. Comp. Science & Engineering student, Linkoping Institute of Technology, Sweden
  41.