Date: Thu, 28 Feb 2002 11:21:12 -0800 From: "David O'Brien" <obrien@freebsd.org> To: Mark Murray <mark@grondar.za> Cc: arch@freebsd.org Subject: Re: Warning and lint(1) fixes. Review please. Message-ID: <20020228112112.A30563@dragon.nuxi.com> In-Reply-To: <200202281836.g1SIaog4051908@grimreaper.grondar.org>; from mark@grondar.za on Thu, Feb 28, 2002 at 06:36:50PM %2B0000 References: <200202281836.g1SIaog4051908@grimreaper.grondar.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Feb 28, 2002 at 06:36:50PM +0000, Mark Murray wrote: > +#ifdef __GNUC__ > #define ATOMIC_ASM(NAME, TYPE, OP, CONS, V) \ > static __inline void \ > atomic_##NAME##_##TYPE(volatile u_##TYPE *p, u_##TYPE v)\ > @@ -97,6 +98,9 @@ > : "+m" (*p) \ > : CONS (V)); \ > } > +#else > +#define ATOMIC_ASM(NAME, TYPE, OP, CONS, V) > +#endif > > /* > * Atomic compare and set, used by the mutex functions > @@ -112,6 +116,7 @@ > { > int res = exp; > > +#ifdef __GNUC__ > __asm __volatile( > " pushfl ; " > " cli ; " > @@ -127,6 +132,7 @@ > : "r" (src), /* 1 */ > "m" (*(dst)) /* 2 */ > : "memory"); > +#endif Because you are changing obvious syntax errors, if one uses a non-GCC compiler, into things that will silently fail; I would be more comfortable with this change if you kept the errors. Can you add #error in the #else cases? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020228112112.A30563>