Index: tools.h
===================================================================
--- tools.h	(revision 19)
+++ tools.h	(revision 20)
@@ -71,12 +71,14 @@
 
 /*---------------------------------------------------------------------------*\
 \*---------------------------------------------------------------------------*/
+#ifndef atomic_xchg
 static inline unsigned long atomic_xchg (
 	volatile atomic_t *	v, 
 	unsigned		value
 ) {
 	return __xchg (value, &v->counter, sizeof (unsigned));
 } /* atomic_xchg */
+#endif
 
 /*---------------------------------------------------------------------------*\
 \*---------------------------------------------------------------------------*/

