Index: soft/giet_vm/libs/barrier.c
===================================================================
--- soft/giet_vm/libs/barrier.c	(revision 165)
+++ soft/giet_vm/libs/barrier.c	(revision 228)
@@ -15,14 +15,12 @@
 
 ///////////////////////////////////////////////////////////////////////////////////
-// 	barrier_init()
+//     barrier_init()
 // This function makes a cooperative initialisation of the barrier: 
 // several tasks try to initialize the barrier, but the initialisation 
 // is done by only one task, using LL/SC instructions.
 ///////////////////////////////////////////////////////////////////////////////////
-void barrier_init( giet_barrier_t* 	barrier, 
-                   unsigned int 	value )
-{
-    unsigned int* pinit  = (unsigned int*)&barrier->init;
-    unsigned int* pcount = (unsigned int*)&barrier->count;
+void barrier_init( giet_barrier_t * barrier, unsigned int value) {
+    unsigned int * pinit  = (unsigned int *) &barrier->init;
+    unsigned int * pcount = (unsigned int *) &barrier->count;
 
     // parallel initialisation using atomic instructions LL/SC 
@@ -30,24 +28,26 @@
     // no output
     asm volatile ("_barrier_init_test:                  \n"
-                  "ll   $2,     0(%0)                   \n" /* read initial value */
-                  "bnez $2,     _barrier_init_done      \n"
-                  "move $3,     %2                      \n"
-                  "sc   $3,     0(%0)                   \n" /* write initial value */
-                  "beqz $3,     _barrier_init_test      \n"
-                  "move $3,     %2                      \n"
-                  "sw   $3,     0(%1)                   \n" /* write count */
-                  "_barrier_init_done:                  \n"
-                  :: "r"(pinit), "r"(pcount), "r"(value)
-                  : "$2", "$3");
+            "ll   $2,     0(%0)                   \n" /* read initial value */
+            "bnez $2,     _barrier_init_done      \n"
+            "move $3,     %2                      \n"
+            "sc   $3,     0(%0)                   \n" /* write initial value */
+            "beqz $3,     _barrier_init_test      \n"
+            "move $3,     %2                      \n"
+            "sw   $3,     0(%1)                   \n" /* write count */
+            "_barrier_init_done:                  \n"
+            :
+            : "r"(pinit), "r"(pcount), "r"(value)
+            : "$2", "$3");
 }
+
+
 ///////////////////////////////////////////////////////////////////////////////////
-//	barrier_wait()
+//    barrier_wait()
 // This blocking function uses LL/SC to decrement the barrier's counter.
 // Then, it uses a busy_waiting mechanism if it is not the last.
 // (because the GIET does not support dynamic task scheduling/descheduling)
 ///////////////////////////////////////////////////////////////////////////////////
-void barrier_wait( giet_barrier_t* barrier )
-{
-    unsigned int* pcount  = (unsigned int*)&barrier->count;
+void barrier_wait(giet_barrier_t * barrier) {
+    unsigned int * pcount  = (unsigned int *) &barrier->count;
     unsigned int maxcount = barrier->init;
     unsigned int count;
@@ -57,23 +57,31 @@
     // - output : counter value
     asm volatile ("_barrier_decrement:          \n"
-                  "ll   %0, 0(%1)               \n"
-                  "addi $3, %0,     -1          \n"
-                  "sc   $3, 0(%1)               \n"
-                  "beqz $3, _barrier_decrement  \n"
-                  : "=&r"(count)
-                  : "r"(pcount)
-                  : "$2", "$3");
+            "ll   %0, 0(%1)               \n"
+            "addi $3, %0,     -1          \n"
+            "sc   $3, 0(%1)               \n"
+            "beqz $3, _barrier_decrement  \n"
+            : "=&r"(count)
+            : "r"(pcount)
+            : "$2", "$3");
 
     // the last task re-initializes the barrier counter to the max value,
     // waking up all other waiting tasks
 
-    if (count == 1) 		// last task 
-    {
+    if (count == 1) {
+        // last task
         *pcount = maxcount;
     }
-    else 			// other tasks busy-wait
-    {
+    else {
+        // other tasks busy-wait
         while (*pcount != maxcount) asm volatile ("nop");
     }
 }
 
+// Local Variables:
+// tab-width: 4
+// c-basic-offset: 4
+// c-file-offsets:((innamespace . 0)(inline-open . 0))
+// indent-tabs-mode: nil
+// End:
+// vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+
