From: Andrew G. <ag...@em...> - 2005-02-16 05:11:23
|
On Feb 15, 2005, at 13:10, Paul Nolan wrote: > I`m getting an error trying to browse the CVS online, is there a more > recent version of ZAtomic, or any other tips for using ZooLib and VS > 2005? Hmmm. I just started writing directions on how to browse the cvs repository, how to check out etc, and in checking my instructions I find that nothing's working. It looks like sourceforge is having some difficulties. In the meantime I'm sending you current copies of ZAtomic.cpp/h in a separate message. I'm afraid I don't know of differences between VC++ 6-ish and VS 2005 that would account for the problems in compiling the assembly code -- it may be that it's stricter in its interpretation of mnemonics, and perhaps the cmpxchg instructions have their operands the wrong way round. I haven't used VC++ et al for years, and nor are any of my current colleagues so ZooLib support for MS dev tools relies on helpful souls pitching in from time to time. wrt smart pointers in general -- the boost library has come on a long way in the last few years, and their smart_ptr will likely be in the next version of the standard library. It's not thread-safe, but might suffice for your purposes. Generally, unless you're assigning *to* a shared smart pointer you only need to update the count manipulation with atomic ops. If you are assigning to a shared smart pointer it's often better to simply protect it with some synchronization entity -- it's possible to update a couple of pointers and an associated count safely on PPC using address reservation instructions, and apparently it's also possible on x86, but I suspect it'll need some post Pentium I instruction to do so. > I also noticed an old post on using ZooLib for PhotoShop plugins, was > any > progress ever made? Not that I'm aware of, at least for PhotoShop plugins. I did do about 90% of what's needed for hosting ZooLib stuff in a browser plugin. It took a week or so and is checked in at src_other/browser. That code uses the original NetScape API, and might be instructive if someone were to want to do something similar for PhotoShop plugins. In the ancient past I had such wrappers for HyperCard, Director and MacOS Control Panels -- such varied hosting environments were one of the initial motivations for developing ZooLib at all. A+ -- Andrew Green mailto:ag...@em... Electric Magic Co. vox: +1 (831) 621 1822 |