Re: Re: [linux-sh:03198] Atomic operations from user-space?
Paul Mundt <[email protected]> Fri, 2 Apr 2004 13:05:38 -0500
| Newsgroups | gmane.linux.ports.sh.devel,gmane.linux.ports.sh.general |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Apr 02, 2004 at 06:55:52PM +0100, Alex Bennee wrote:
> Thanks. I've got them on my cross-compiled libs. However having looked
> at them I can't see any magic. For example:
>
> static inline void
> __attribute__ ((__unused__))
> __atomic_add (_Atomic_word* __mem, int __val)
> {
> *__mem += __val;
> }
>
> Doesn't seem to do anything to guarantee atomicity unless it is assumed
> the code compiles to a single instruction. Unless I'm missing some magic
> somewhere?
>
What you probably want is the gUSA patches for glibc. See:
http://sources.redhat.com/ml/libc-hacker/2002-05/msg00029.html
the kernel side of gUSA support is in place already, so you don't need to do
anything special for that.
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQFAbaty1K+teJFxZ9wRAp4cAJ9Y76j5XLBpLgcTGb1OEMavsKQqRACfUFeh YZOi4FLCGcodayxH9CWOGPs= =5P3d -----END PGP SIGNATURE-----