Skip to contentSkip to conversation

Proposal for a userspace "architecture portability" library

DISCUSSION Dan Kegel 1 participant 1 message Dec 5, 2004

lore
Share & tools
lore

Dan Kegel

author
#0 lore raw
Quoted 4 lines · Roland McGrath
Quoted 1 line

I don't think glibc exports any atomic operations.

That is true. But it does have implementations in bits/atomic.h for many processors, and that is under the LGPL.

Interesting. This seems to be new as of glibc-2.3.3. (glibc-2.3.2 had implementations of all sorts of things, spinlocks even, but they were all internal.)

gcc's libstdc++ also exports an atomicity.h (in e.g. /usr/include/c++/3.4.2/bits/atomicity.h).

gcc's libjava also has its own set of lock primitives (buried in a file named locks.h).

It would be quite the engineering feat to demonstrate a gcc/glibc toolchain actually using your proposed portability layer and demonstrate zero loss of performance. Even that might not be enough to convince the glibc maintainer to use it...
- Dan

Signature · 1 line
Trying to get a job as a c++ developer?  See http://kegel.com/academy/getting-hired.html