Index: src/atomic/gcc_pcc.c
===================================================================
--- src/atomic/gcc_pcc.c	(revision 0)
+++ src/atomic/gcc_pcc.c	(revision 0)
@@ -0,0 +1,69 @@
+/* atomic/gcc_pcc.c
+ *  Copyright (C) 2006, The Perl Foundation.
+ *  SVN Info
+ *     $Id$
+ *  Overview:
+ *     This file provides an implementation of atomic
+ *     operations on PowerPC platforms with GCC-style
+ *     inline assembly suppport.
+ *  Data Structure and Algorithms:
+ *  History:
+ *  Notes:
+ *  References:
+ */
+
+#include "parrot/atomic/gcc_pcc.h"
+
+PARROT_INLINE
+void
+*parrot_ppc_cmpset(void * volatile *ptr, void *expect, void *update)
+{
+    void *tmp;
+    /* see http://www-128.ibm.com/developerworks/linux/library/pa-atom/ */
+    __asm__ __volatile__(/*%0 = tmp, %1 = ptr, %2 = old, %3 = new */
+                            "1:  lwarx %0, 0, %1\n"     /* tmp = *ptr, with reservation */
+                            "    cmpw %2, %0\n" /* tmp == old ? */
+                            "    bne 2f\n"      /* no, goto flush reservation, end */
+                            /* "    sync\n" -- XXX needed on PPC 405, see
+                             * http://www.kegel.com/xgcc3/ppc405erratum77.html */
+                            "    stwcx. %3, 0, %1\n"    /* store new using reservation */
+                            "    bne- 1b\n"     /* spin on failure of reservation; - is branch prediction hint */
+                            "    b 3f\n" "2:  stwcx. %0, 0, %1\n"       /* flush reserveration */
+                            "3:  \n"    /* end label */
+                            :   /* output */
+                            "=&r"(tmp)
+                            :   /* input */
+                            "r"(ptr), "r"(expect), "r"(update)
+                            :   /* clobber */
+                            "memory");
+    return tmp;
+}
+
+PARROT_INLINE
+long
+parrot_ppc_add(volatile long *val, long what)
+{
+    long tmp;
+    __asm__ __volatile__(/*%0 = tmp, %1 = val, %2 = what */
+                            "1:  lwarx %0, 0, %1\n"     /* tmp = *val, with reservation */
+                            "    add %0, %0, %2\n"      /* tmp += what */
+                            /* "    sync\n" -- XXX needed on PPC 405, see
+                             * http://www.kegel.com/xgcc3/ppc405erratum77.html */
+                            "    stwcx. %0, 0, %1\n"    /* *val <- tmp using reservation */
+                            "    bne- 1b\n"     /* spin on failure of reservation; - is branch prediction hint */
+                            "2:  \n"    /* end label */
+                            :   /* output */
+                            "=&r"(tmp)
+                            :   /* input */
+                            "r"(val), "r"(what)
+                            :   /* clobber */
+                            "memory");
+    return tmp;
+}
+
+/*
+ * Local variables:
+ *   c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */

Property changes on: src/atomic/gcc_pcc.c
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Index: include/parrot/atomic/gcc_pcc.h
===================================================================
--- include/parrot/atomic/gcc_pcc.h	(revision 22746)
+++ include/parrot/atomic/gcc_pcc.h	(working copy)
@@ -23,49 +23,11 @@
 
 #  define PARROT_ATOMIC_PTR_SET(a, b) (a).val = (void *) (b)
 
-inline static void *parrot_ppc_cmpset(void * volatile *ptr,
-                                      void *expect, void *update)
-{
-    void *tmp;
-    /* see http://www-128.ibm.com/developerworks/linux/library/pa-atom/ */
-    __asm__ __volatile__(/*%0 = tmp, %1 = ptr, %2 = old, %3 = new */
-                            "1:  lwarx %0, 0, %1\n"     /* tmp = *ptr, with reservation */
-                            "    cmpw %2, %0\n" /* tmp == old ? */
-                            "    bne 2f\n"      /* no, goto flush reservation, end */
-                            /* "    sync\n" -- XXX needed on PPC 405, see
-                             * http://www.kegel.com/xgcc3/ppc405erratum77.html */
-                            "    stwcx. %3, 0, %1\n"    /* store new using reservation */
-                            "    bne- 1b\n"     /* spin on failure of reservation; - is branch prediction hint */
-                            "    b 3f\n" "2:  stwcx. %0, 0, %1\n"       /* flush reserveration */
-                            "3:  \n"    /* end label */
-                            :   /* output */
-                            "=&r"(tmp)
-                            :   /* input */
-                            "r"(ptr), "r"(expect), "r"(update)
-                            :   /* clobber */
-                            "memory");
-    return tmp;
-}
+PARROT_INLINE void
+*parrot_ppc_cmpset(void * volatile *ptr, void *expect, void *update);
 
-inline static long parrot_ppc_add(volatile long *val, long what)
-{
-    long tmp;
-    __asm__ __volatile__(/*%0 = tmp, %1 = val, %2 = what */
-                            "1:  lwarx %0, 0, %1\n"     /* tmp = *val, with reservation */
-                            "    add %0, %0, %2\n"      /* tmp += what */
-                            /* "    sync\n" -- XXX needed on PPC 405, see
-                             * http://www.kegel.com/xgcc3/ppc405erratum77.html */
-                            "    stwcx. %0, 0, %1\n"    /* *val <- tmp using reservation */
-                            "    bne- 1b\n"     /* spin on failure of reservation; - is branch prediction hint */
-                            "2:  \n"    /* end label */
-                            :   /* output */
-                            "=&r"(tmp)
-                            :   /* input */
-                            "r"(val), "r"(what)
-                            :   /* clobber */
-                            "memory");
-    return tmp;
-}
+PARROT_INLINE long
+parrot_ppc_add(volatile long *val, long what);
 
 #  define PARROT_ATOMIC_PTR_CAS(result, a, expect, update) \
     do { \
Index: config/gen/makefiles/root.in
===================================================================
--- config/gen/makefiles/root.in	(revision 22746)
+++ config/gen/makefiles/root.in	(working copy)
@@ -379,6 +379,7 @@
     \
     $(OPS_DIR)/core_ops$(O) \
     $(OPS_DIR)/core_ops_switch$(O) \
+    $(SRC_DIR)/atomic/gcc_pcc$(O) \
     $(SRC_DIR)/builtin$(O) \
     $(SRC_DIR)/byteorder$(O) \
     $(SRC_DIR)/charset$(O) \
