C++ compaird my function.
In "solaris 5.10", anything is ok! But in "solaris 5.9", if I do not have a prototype, it gives me the error "The function "atomic_add_32_nv" must have a prototype."
Please help me!
C++ compaird my function.
In "solaris 5.10", anything is ok! But in "solaris 5.9", if I do not have a prototype, it gives me the error "The function "atomic_add_32_nv" must have a prototype."
Please help me!
The atomic function support (through <atomic.h>
) was added in Solaris 10, as far as I recall. Googling for "solaris 10 atomic operations" seems to support this through various hits.
On Solaris 9 you either need to provide a wrapper using mutexes (which is considerably slower than atomic operations; but may not matter to your app) or implement those functions (per processor/architecture x86/sparc, you need to support) using assembler.
You could also look around how common open source projects (e.g. apache httpd, boost) do it and go from there.
For a related discussion see this SO topic.