gcc 4.1 implements compiler builtins for atomic ops
John David Anglin
dave@hiauly1.hia.nrc.ca
Mon Jun 27 17:38:00 GMT 2005
> > Damn, these things should be in glibc, not the compiler !
>
> I want to use the vDSO to hide the light-weight-syscall behind a
> versionable interface.
I'm not so sure. Calls are expensive. Also, they affect memory
barrier semantics. If the operations are not a full barrier, gcc
needs to know. See extend.texi in gcc 4.1.
> If gcc required atomic operations they would come from glibc or the
> vDSO. I am willing to pay the price of a function call. In gcc I will
> just emit a libcall.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
More information about the Libc-alpha
mailing list