cvs commit: src/sys/netgraph ng_base.c

Alexander Motin mav at FreeBSD.org
Mon Apr 7 12:23:52 UTC 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi.

Alexander Motin wrote:
> mav         2008-04-06 15:26:32 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sys/netgraph         ng_base.c 
>   Log:
>   Rewrite node's r/w/q-lock semantics using only atomics instead of mutex
>   and atomics combination. Mutex is now used only for queue protection.
>   Also avoid unneded extra swi scheduling calls.
>   
>   Revision  Changes    Path
>   1.155     +76 -247   src/sys/netgraph/ng_base.c

This patch broke tinderbox build on powerpc. But as soon as I have only
replaced _add_ with _set_ and _subtract_ with _clear_ IMHO problem is
powerpc atomic.h related. That atomic.h looks something strange:

#define atomic_set_long                 atomic_set_32

#define atomic_clear_long               atomic_clear_32

#define atomic_add_long(p, v)           atomic_add_32((uint32_t *)p,
(uint32_t)v)
#define atomic_subtract_long(p, v)      atomic_subtract_32((uint32_t
*)p, (uint32_t)v)
#define atomic_readandclear_long        atomic_readandclear_32


Can somebody with powerpc experience check this?

- --
Alexander Motin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH+hJV0kCgngV3usoRAjtBAJ9+f7dzmXv8xVcmLG3h3x22eg8B9gCfVuvE
5aDm6E5iX1r7tfsQ/kmR0GU=
=14ws
-----END PGP SIGNATURE-----


More information about the cvs-src mailing list