home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 2435 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: news.uit.no!news
  2. From: nilss@stud.cs.uit.no (Nils Peter Sudmann)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Removing a patch - solved?
  5. Date: 30 Jan 96 18:20:28 +0100
  6. Organization: University of Tromsoe, Norway
  7. Message-ID: <1433.6603T1100T1439@stud.cs.uit.no>
  8. References: <1996Jan22.150212.23377@ludens> <4e1p58$4l2@misery.millcomm.com> <815.6602T1142T756@norconnect.no>
  9. NNTP-Posting-Host: uit-or4.uit.no
  10. X-Newsreader: THOR 2.22 (Amiga;TCP/IP)
  11.  
  12. On 29-Jan-96 20:53:41, Kenneth C. Nilsen (kenneth@norconnect.no) wrote:
  13. >>genie@ludens.elte.hu wrote:
  14. >>:  - Has the removing of a patch problem been already solved?
  15. >>Nope.  I gave it a try myself, but ran in to the Exception processing 
  16. >>problem.
  17.  
  18. >You have to remove the patches the opposite way they where installed. A
  19. >patch has to check the pointer it got when first installed and compare it to
  20. >the pointer it gets when removing it selv. If they are not alike it have to
  21. >reinstall with this new pointer and wait. As you can see this is a critical
  22. >point cause there is a theoretical possibility that other programs patches
  23. >this vector while ours is comparing pointers.
  24.  
  25. This critical point is easily avoided by enclosing the check with a
  26. forbid()/permit(). This is not the problem. The problem is that some program
  27. could be executing inside your patched code (and currently waiting for a time
  28. slice). AFAIK there is *no* way to safely know when the last thread of control
  29. has left your code (and you may unload it). So a patch should actually never
  30. remove itself (only render itself inactive). I did miss the previous patch
  31. discussion, but I wrote one myself and came to the above conclusion. Right or
  32. wrong?
  33.  
  34. --
  35. Nils Peter Sudmann                  // Using Thor v2.21/#1113, sign v1.5
  36. "Truth, a random variable possibly // EMAIL: nilss@stud.cs.uit.no
  37.  containing complex numbers"      // WWW: http://www.cs.uit.no/~nilss
  38.  
  39.  
  40.