-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
in attach /gp - -- gian paolo ciceri - japanman suddenthinks, excellence through refactoring ++39 340 7218101 [EMAIL PROTECTED] [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFCTbJ/5CXmEF0gaHgRAm8XAKCvajRIIZT4826W3j9EnNMLC3zFtwCghmiN 4SlVXpwCIZRpfeZBxfgKanQ= =oeZA -----END PGP SIGNATURE-----
-- gian paolo ciceri - japanman suddenthinks, excellence through refactoring ++39 340 7218101 [EMAIL PROTECTED] [EMAIL PROTECTED]
--- katomic.h.orig 2005-04-01 11:59:34.000000000 +0200 +++ katomic.h 2005-04-01 13:00:44.000000000 +0200 @@ -27,6 +27,43 @@ /* Wrapper macros to call pre_NN_post (mem, ...) where NN is the bit width of *MEM. The calling macro puts parens around MEM and following args. */ + + +#if __GNUC__ == 2 + +#define __atomic_val_bysize(pre, post, mem, args...) \ + ({ \ + __typeof (*mem) __result; \ + if (sizeof (*mem) == 1) \ + __result = pre##_8_##post (mem, args...); \ + else if (sizeof (*mem) == 2) \ + __result = pre##_16_##post (mem, args...); \ + else if (sizeof (*mem) == 4) \ + __result = pre##_32_##post (mem, args...); \ + else if (sizeof (*mem) == 8) \ + __result = pre##_64_##post (mem, args...); \ + else \ + abort (); \ + __result; \ + }) +#define __atomic_bool_bysize(pre, post, mem, args...) \ + ({ \ + int __result; \ + if (sizeof (*mem) == 1) \ + __result = pre##_8_##post (mem, args...); \ + else if (sizeof (*mem) == 2) \ + __result = pre##_16_##post (mem, args...); \ + else if (sizeof (*mem) == 4) \ + __result = pre##_32_##post (mem, args...); \ + else if (sizeof (*mem) == 8) \ + __result = pre##_64_##post (mem, args...); \ + else \ + abort (); \ + __result; \ + }) + +#else + #define __atomic_val_bysize(pre, post, mem, ...) \ ({ \ __typeof (*mem) __result; \ @@ -57,7 +94,10 @@ abort (); \ __result; \ }) - + + +#endif + /* Atomically store NEWVAL in *MEM if *MEM is equal to OLDVAL. Return the old *MEM value. */
_______________________________________________ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe