Hi James, James Berry <[EMAIL PROTECTED]> writes:
> But I did see at least one use of the compareAndSwap routine, somewhere > in the transcoder support, I believe, though I didn't look into that > usage to see if it's really necessary. That's a bummer. compareAndSwap is used in TransService.cpp, WinSock/BinHTTPURLInputSource.cpp, and DOMDocumentTypeImpl.cpp. The first case can be converted to use fgAtomicMutex as is done in other places. For WinSock/BinHTTPURLInputSource we can hard- code Window API calls or use fgAtomicMutex as well (BTW, even with correct comareAndSwap code in BinHTTPURLInputSource is not thread-safe on some architectures). The last case should probably use static initialization. Any thoughts? > The compareAndSwap routine interface is better, as it swaps void*, > which is at least a reasonable type. We will still have to deal with the insane implementation on POSIX systems. Boris -- Boris Kolpackov, Code Synthesis Tools Open source XML data binding for C++: http://codesynthesis.com/products/xsd Mobile/embedded validating XML parsing: http://codesynthesis.com/products/xsde --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
