--Zi0sgQQBxRFxMTsj
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Sat, Feb 02, 2008 at 09:56:42PM +0200, Alexander Motin wrote:
>Peter Jeremy ?????:
>> On Sat, Feb 02, 2008 at 11:31:31AM +0200, Alexander Motin wrote:
>>> To check UMA dependency I have made a trivial one-element cache which i=
n=20
>>> my test case allows to avoid two for four allocations per packet.
>>=20
>> You should be able to implement this lockless using atomic(9). I haven't
>> verified it, but the following should work.
>
>I have tried this, but man 9 atomic talks:
>
>The atomic_readandclear() functions are not implemented for the types
>``char'', ``short'', ``ptr'', ``8'', and ``16'' and do not have any=20
>variants with memory barriers at this time.
Hmmm. This seems to be more a documentation bug than missing code:
atomic_readandclear_ptr() seems to be implemented on most
architectures (the only one where I can't find it is arm) and is
already used in malloc(3).
--=20
Peter Jeremy
Please excuse any delays as the result of my ISP's inability to implement
an MTA that is either RFC2821-compliant or matches their claimed behaviour.
--Zi0sgQQBxRFxMTsj
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)
iD8DBQFHpNdH/opHv/APuIcRAjglAJ4xNZrFttUitci+60Q+GyVvdziGrQCaAkxf
c2uNtF4tELpQ+7FHoc07LLY=
=ZYY7
-----END PGP SIGNATURE-----
--Zi0sgQQBxRFxMTsj--