Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!samsung!olivea!oliveb!amiga!boing!dale From: dale@boing.UUCP (Dale Luck) Newsgroups: comp.sys.amiga.programmer Subject: Re: Need help accessing MathTrans library from Task Message-ID: <956@boing.UUCP> Date: 14 Mar 91 02:57:34 GMT References: <5778@awdprime.UUCP> <29024.27db9dce@kuhub.cc.ukans.edu> <5847@awdprime.UUCP> <29036.27dcecfb@kuhub.cc.ukans.edu> Reply-To: dale@boing.UUCP (Dale Luck) Distribution: na Organization: Boing, Milpitas, Ca. Lines: 27 In article <29036.27dcecfb@kuhub.cc.ukans.edu> markv@kuhub.cc.ukans.edu writes: >In article <5847@awdprime.UUCP>, (Jason Lowdermilk) writes: >So, the parent of the child needs to OpenLibrary() so that the library >is in memory. Then the child can get the base from the parent >(easy to do if child is a function in the parent and they share global >data), otherwise the child can call OpenLibrary() as long as the >parent holds mathtrans.library open to keep it in memory. This is not supported and can lead to unexpected results, especially if both parent and child then try to use the same library. All tasks must open the math libraries for themselves. Sharing LibBase pointers is illegal. To get around the 'feature' in OpenLibrary needing a Process in case the library is disk based you should open it first by the parent and then open it a second time by the child. You should also not store the variable in the same place since the return from the OpenLibrary call could be different even though you are opening the same library. >As a side note, 2.0 has a single precision IEEE lib that will use the >FPU if available and gives performance close the the FFP routines of >1.3 even w/o the FPU. Sharing LibBase ptrs here is guarenteed to be illegal and a mistake. -- Dale Luck GfxBase/Boing, Inc. {uunet!cbmvax|pyramid}!amiga!boing!dale