Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!vsi1!altnet!uunet!super!rminnich From: rminnich@super.ORG (Ronald G Minnich) Newsgroups: comp.sys.amiga.tech Subject: Re: Negative Open Counts (was Re: IEEE libraries) Keywords: open counts Message-ID: <729@super.ORG> Date: 13 Sep 88 12:27:48 GMT References: <1356@percival.UUCP> <358@boing.UUCP> <1570@sbcs.sunysb.edu> <362@boing.UUCP> <39822@linus.UUCP> Sender: uucp@super.ORG Reply-To: rminnich@metropolis.UUCP (Ronald G Minnich) Distribution: na Organization: Supercomputing Research Center, Lanham, MD Lines: 14 In article <39822@linus.UUCP> eachus@mitre-bedford.ARPA (Robert I. Eachus) writes: > decrement the count by one. Libraries may only be unloaded > when the count is zero. > Simple and sweet. I like the idea of ratcheting the count down, One good reason to let the count go less than -1 is debugging. i.e. you are looking with amon, and see a library with -1 count. Who did it? If it always stays at -1 you don't know. If you run something and see it go to -3 you have your culprit. Only potential problem is the count could wrap to positive numbers after the 16384-th bogus double-close :-) (or is that 1,000,000,000 bogus double close ??:-) Either way, a real nice way to handle it. No gurus, you pay a little memory, which is a good tradeoff... ron