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

  1. Path: comma.rhein.de!serpens!not-for-mail
  2. From: mlelstv@serpens.rhein.de (Michael van Elst)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: opening muimaster.library from another lib
  5. Date: 7 Jan 1996 19:35:41 +0100
  6. Organization: dis-
  7. Message-ID: <4cp3pt$dce@serpens.rhein.de>
  8. References: <621.6574T1181T1758@xs4all.nl> <30e9e646@lls.se> <699.6577T179T1076@xs4all.nl> <4cm4ao$1ub@serpens.rhein.de> <882.6580T131T1213@xs4all.nl>
  9. NNTP-Posting-Host: serpens.rhein.de
  10.  
  11. muaddib@xs4all.nl (thomas) writes:
  12.  
  13. >1) Where can I obtain the specification for AmigaOS shared libraries,
  14. >   I could not find it in the romkernels, autodocs or developer kit.
  15.  
  16. Well. I don't think that it is written as such. But if you read
  17. the RKRMs you will find a description on how libraries work and what
  18. is allowed where. This is authoritative until superceded.
  19.  
  20. >2) Why does the example shared library example in the romkernel open
  21. >   dos.library in it's init code. It might be always resident for
  22. >   the current kickstarts, but this could change, and, above all,
  23. >   why be inconsequent and open the dos.library there and all other
  24. >   libraries the library needs in libopen. I find this really
  25. >   the style of a c0d3r, whatever that may be.
  26.  
  27. The specification does not forbid opening of libraries. It does forbid
  28. to break single-threadedness which is achieved by Forbid(). The example
  29. _assumes_ that opening dos.library does not break a Forbid(), that's
  30. why it is a bad example. You could also treat it as the statement that
  31. opening dos.library will never break Forbid(). In any case this is
  32. just guessing on your part. Following the rule is therefore playing on
  33. the safe side.
  34.  
  35. I mean, what will happen if you follow the rule (which says: don't break
  36. Forbid(), it also says: you must not rely on being single-tasked but just
  37. single-threaded) ? It means that you will never break when the Forbidden
  38. state is necessary and you will never break when you aren't singled-tasked
  39. any more.
  40.  
  41. What will happen if you ignore the rule ?
  42.  
  43. I see one reason why this rule might be relaxed in the future. AREXX opens
  44. and closes each library for each statement. If you allocate resources
  45. (like other libraries) in the open routine and free them in the close routine
  46. then this generates a much higher overhead, especially when allocating a resource
  47. implies some disk access. But I'd rather fix this behaviour in AREXX.
  48.  
  49. Regards,
  50. -- 
  51.                                 Michael van Elst
  52.  
  53. Internet: mlelstv@serpens.rhein.de
  54.                                 "A potential Snark may lurk in every tree."
  55.