Index: /soft/giet_vm/giet_libs/stdio.c
===================================================================
--- /soft/giet_vm/giet_libs/stdio.c	(revision 437)
+++ /soft/giet_vm/giet_libs/stdio.c	(revision 438)
@@ -14,10 +14,10 @@
 ////////////////////////////////////////////////////////////////////////////////////
 
-/////////////////
+////////////////////////////////////////////
 void giet_proc_xyp( unsigned int* cluster_x,
                     unsigned int* cluster_y,
                     unsigned int* lpid )
 {
-    sys_call( SYSCALL_PROCID,
+    sys_call( SYSCALL_PROC_XYP,
               (unsigned int)cluster_x,
               (unsigned int)cluster_y,
@@ -26,16 +26,16 @@
 }
 
-////////////////////
-int giet_proctime() 
-{
-    return sys_call( SYSCALL_PROCTIME, 
-                     0, 0, 0, 0 );
-}
-
-///////////////
-int giet_rand() 
-{
-    unsigned int x = sys_call(SYSCALL_PROCTIME,
-                              0, 0, 0, 0);
+////////////////////////////
+unsigned int giet_proctime() 
+{
+    return (unsigned int)sys_call( SYSCALL_PROC_TIME, 
+                                   0, 0, 0, 0 );
+}
+
+////////////////////////
+unsigned int giet_rand() 
+{
+    unsigned int x = (unsigned int)sys_call( SYSCALL_PROC_TIME,
+                                             0, 0, 0, 0);
     if ((x & 0xF) > 7) 
     {
@@ -47,4 +47,30 @@
     }
 }
+
+//////////////////////////////////////////////////////////////////////////////////
+///////////////////// Task context  system calls /////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////////
+
+////////////////////////////////
+unsigned int giet_proc_task_id() 
+{
+    return (unsigned int)sys_call( SYSCALL_LOCAL_TASK_ID, 
+                                   0, 0, 0, 0 );
+}
+
+//////////////////////////////////
+unsigned int giet_global_task_id() 
+{
+    return (unsigned int)sys_call( SYSCALL_GLOBAL_TASK_ID, 
+                                   0, 0, 0, 0 );
+}
+
+/////////////////////////////
+unsigned int giet_thread_id() 
+{
+    return (unsigned int)sys_call( SYSCALL_THREAD_ID, 
+                                   0, 0, 0, 0 );
+}
+
 
 ////////////////////////////////////////////////////////////////////////////////////
@@ -52,8 +78,14 @@
 ////////////////////////////////////////////////////////////////////////////////////
 
-///////////////////////////////////////////////////////////////////////
-static int __printf( char* format, unsigned int channel, va_list* args) 
-{
-    int ret;                    // return value from the syscalls 
+/////////////////////
+void giet_tty_alloc()
+{
+    sys_call( SYSCALL_TTY_ALLOC, 0, 0 ,0 ,0 );
+}
+
+////////////////////////////////////////////////////////////////////////
+static  int __printf( char* format, unsigned int channel, va_list* args) 
+{
+    int ret;                    // return value from the syscall 
 
 printf_text:
@@ -420,8 +452,16 @@
 
 ///////////////////////
-void giet_timer_start() 
-{
-    if ( sys_call( SYSCALL_TIMER_START, 0, 0, 0, 0 ) ) 
-       giet_exit("error in giet_timer_start()");
+void giet_timer_alloc() 
+{
+    if ( sys_call( SYSCALL_TIM_ALLOC,
+                   0, 0, 0, 0 ) ) giet_exit("error in giet_timer_alloc()");
+}
+
+////////////////////////////////////////////
+void giet_timer_start( unsigned int period ) 
+{
+    if ( sys_call( SYSCALL_TIM_START,
+                   period,
+                   0, 0, 0 ) ) giet_exit("error in giet_timer_start()");
 }
 
@@ -429,6 +469,6 @@
 void giet_timer_stop() 
 {
-    if ( sys_call( SYSCALL_TIMER_STOP, 0, 0, 0, 0 ) ) 
-        giet_exit("error in giet_timer_stop()");
+    if ( sys_call( SYSCALL_TIM_STOP,
+                   0, 0, 0, 0 ) ) giet_exit("error in giet_timer_stop()");
 }
 
@@ -438,53 +478,60 @@
 //////////////////////////////////////////////////////////////////////////////////
 
-////////////////////////////////////////////
-void giet_fb_sync_write( unsigned int offset, 
-                        void *       buffer, 
-                        unsigned int length ) 
-{
-    if ( sys_call( SYSCALL_FB_SYNC_WRITE, 
+/////////////////////////
+void giet_fbf_cma_alloc()
+{
+    if ( sys_call( SYSCALL_FBF_CMA_ALLOC, 
+                   0, 0, 0, 0 ) )    giet_exit("error in giet_fbf_cma_alloc()");
+}
+
+///////////////////////////////////////////
+void giet_fbf_cma_start( void *       buf0,
+                         void *       buf1,
+                         unsigned int length )
+{
+    if ( sys_call( SYSCALL_FBF_CMA_START,
+                   (unsigned int)buf0, 
+                   (unsigned int)buf1, 
+                   length,
+                   0 ) )   giet_exit("error in giet_fbf_cma_start()");
+}
+
+////////////////////////////////////////////////
+void giet_fbf_cma_display( unsigned int buffer )
+{
+    if ( sys_call( SYSCALL_FBF_CMA_DISPLAY,
+                   buffer, 
+                   0, 0, 0 ) )   giet_exit("error in giet_fbf_cma_display()");
+}
+
+////////////////////////
+void giet_fbf_cma_stop()
+{
+    if ( sys_call( SYSCALL_FBF_CMA_STOP, 
+                   0, 0, 0, 0 ) )    giet_exit("error in giet_fbf_cma_stop()");
+}
+
+//////////////////////////////////////////////
+void giet_fbf_sync_write( unsigned int offset, 
+                          void *       buffer, 
+                          unsigned int length ) 
+{
+    if ( sys_call( SYSCALL_FBF_SYNC_WRITE, 
                    offset, 
                    (unsigned int)buffer, 
                    length, 
-                   0 ) )  giet_exit("error in giet_fb_sync_write()");
-}
-
-///////////////////////////////////////////
-void giet_fb_sync_read( unsigned int offset, 
-                        void *       buffer, 
-                        unsigned int length ) 
-{
-    if ( sys_call( SYSCALL_FB_SYNC_READ, 
+                   0 ) )  giet_exit("error in giet_fbf_sync_write()");
+}
+
+/////////////////////////////////////////////
+void giet_fbf_sync_read( unsigned int offset, 
+                         void *       buffer, 
+                         unsigned int length ) 
+{
+    if ( sys_call( SYSCALL_FBF_SYNC_READ, 
                    offset, 
                    (unsigned int)buffer, 
                    length, 
-                   0 ) )   giet_exit("error in giet_fb_sync_read()");
-}
-
-/////////////////////////////////////////
-void giet_fb_cma_init( void *       buf0,
-                       void *       buf1,
-                       unsigned int length )
-{
-    if ( sys_call( SYSCALL_FB_CMA_INIT, 
-                   (unsigned int)buf0, 
-                   (unsigned int)buf1, 
-                   length, 
-                   0 ) )   giet_exit("error in giet_fb_cma_init()");
-}
-
-///////////////////////////////////////////////
-void giet_fb_cma_write( unsigned int buffer_id )
-{
-    if ( sys_call( SYSCALL_FB_CMA_WRITE, 
-                   buffer_id, 
-                   0, 0, 0 ) )   giet_exit("error in giet_fb_cma_write()");
-}
-
-////////////////////////
-void giet_fb_cma_stop()
-{
-    if ( sys_call( SYSCALL_FB_CMA_STOP, 
-                   0, 0, 0, 0 ) )    giet_exit("error in giet_fb_cma_stop()");
+                   0 ) )   giet_exit("error in giet_fbf_sync_read()");
 }
 
@@ -494,16 +541,25 @@
 //////////////////////////////////////////////////////////////////////////////////
 
-/////////////////////////
-void giet_nic_cma_start()
-{
-    if ( sys_call( SYSCALL_NIC_CMA_START, 0, 0, 0, 0 ) )  
-       giet_exit("error in giet_nic_cma_start()");
-}
-
-/////////////////////////
-void giet_nic_cma_stop()
-{
-    if ( sys_call( SYSCALL_NIC_CMA_STOP, 0, 0, 0, 0 ) )  
-        giet_exit("error in giet_nic_cma_stop()");
+/////////////////////
+void giet_nic_alloc()
+{
+    if ( sys_call( SYSCALL_NIC_ALLOC,
+                   0, 0, 0, 0 ) ) giet_exit("error in giet_nic_alloc()");
+}
+
+///////////////////////////////////////
+void giet_nic_sync_send( void* buffer )
+{
+    if ( sys_call( SYSCALL_NIC_SYNC_SEND,
+                   (unsigned int)buffer,
+                   0, 0, 0 ) )  giet_exit("error in giet_nic_sync_send()");
+}
+
+//////////////////////////////////////////
+void giet_nic_sync_receive( void* buffer )
+{
+    if ( sys_call( SYSCALL_NIC_SYNC_RECEIVE,
+                   (unsigned int)buffer,
+                   0, 0, 0 ) )  giet_exit("error in giet_nic_sync_receive()");
 }
 
@@ -595,28 +651,4 @@
 
 
-//////////////////////////////////////////////////////////////////////////////////
-///////////////////// Task context  system calls /////////////////////////////////
-//////////////////////////////////////////////////////////////////////////////////
-
-///////////////////////
-int giet_proc_task_id() 
-{
-    return sys_call( SYSCALL_LOCAL_TASK_ID, 
-                     0, 0, 0, 0 );
-}
-
-/////////////////////////
-int giet_global_task_id() 
-{
-    return sys_call( SYSCALL_GLOBAL_TASK_ID, 
-                     0, 0, 0, 0 );
-}
-
-////////////////////
-int giet_thread_id() 
-{
-    return sys_call( SYSCALL_THREAD_ID, 
-                     0, 0, 0, 0 );
-}
 
 
@@ -645,16 +677,4 @@
     sys_call( SYSCALL_CTX_SWITCH,
               0, 0, 0, 0 );
-}
-
-////////////////////////////////////////////////////
-void giet_vobj_get_vbase( char*         vspace_name, 
-                          char*         vobj_name, 
-                          unsigned int* vobj_vaddr ) 
-{
-    if ( sys_call( SYSCALL_VOBJ_GET_VBASE, 
-                   (unsigned int) vspace_name,
-                   (unsigned int) vobj_name,
-                   (unsigned int) vobj_vaddr,
-                   0 ) )  giet_exit("ERROR in giet_vobj_get_vbase()");
 }
 
@@ -667,4 +687,28 @@
                    (unsigned int) buffer, 
                    0, 0) )  giet_exit("ERROR in giet_proc_number()");
+}
+
+////////////////////////////////////////////////////
+void giet_vobj_get_vbase( char*         vspace_name, 
+                          char*         vobj_name, 
+                          unsigned int* vbase ) 
+{
+    if ( sys_call( SYSCALL_VOBJ_GET_VBASE, 
+                   (unsigned int) vspace_name,
+                   (unsigned int) vobj_name,
+                   (unsigned int) vbase,
+                   0 ) )  giet_exit("ERROR in giet_vobj_get_vbase()");
+}
+
+////////////////////////////////////////////////////
+void giet_vobj_get_length( char*         vspace_name, 
+                           char*         vobj_name, 
+                           unsigned int* length ) 
+{
+    if ( sys_call( SYSCALL_VOBJ_GET_LENGTH, 
+                   (unsigned int) vspace_name,
+                   (unsigned int) vobj_name,
+                   (unsigned int) length,
+                   0 ) )  giet_exit("ERROR in giet_vobj_get_length()");
 }
 
Index: /soft/giet_vm/giet_libs/stdio.h
===================================================================
--- /soft/giet_vm/giet_libs/stdio.h	(revision 437)
+++ /soft/giet_vm/giet_libs/stdio.h	(revision 438)
@@ -16,37 +16,37 @@
 // the _syscall_vector defined in file sys_handler.c
 
-#define SYSCALL_PROCID            0x00
-#define SYSCALL_PROCTIME          0x01
+#define SYSCALL_PROC_XYP          0x00
+#define SYSCALL_PROC_TIME         0x01
 #define SYSCALL_TTY_WRITE         0x02
 #define SYSCALL_TTY_READ          0x03
-#define SYSCALL_TIMER_START       0x04
-#define SYSCALL_TIMER_STOP        0x05
-#define SYSCALL_TTY_GET_LOCK      0x06
-#define SYSCALL_TTY_RELEASE_LOCK  0x07
-#define SYSCALL_HEAP_INFO         0x08
-#define SYSCALL_LOCAL_TASK_ID     0x09
-#define SYSCALL_GLOBAL_TASK_ID    0x0A
-#define SYSCALL_FB_CMA_INIT       0x0B
-#define SYSCALL_FB_CMA_WRITE      0x0C
-#define SYSCALL_FB_CMA_STOP       0x0D
+#define SYSCALL_TTY_ALLOC         0x04
+#define SYSCALL_TTY_GET_LOCK      0x05
+#define SYSCALL_TTY_RELEASE_LOCK  0x06
+#define SYSCALL_HEAP_INFO         0x07
+#define SYSCALL_LOCAL_TASK_ID     0x08
+#define SYSCALL_GLOBAL_TASK_ID    0x09
+#define SYSCALL_FBF_CMA_ALLOC     0x0A
+#define SYSCALL_FBF_CMA_START     0x0B
+#define SYSCALL_FBF_CMA_DISPLAY   0x0C
+#define SYSCALL_FBF_CMA_STOP      0x0D
 #define SYSCALL_EXIT              0x0E
 #define SYSCALL_PROC_NUMBER       0x0F
 
-#define SYSCALL_FB_SYNC_WRITE     0x10
-#define SYSCALL_FB_SYNC_READ      0x11
+#define SYSCALL_FBF_SYNC_WRITE    0x10
+#define SYSCALL_FBF_SYNC_READ     0x11
 #define SYSCALL_THREAD_ID         0x12
-#define SYSCALL_FREE_13           0x13
-#define SYSCALL_FREE_14           0x14
-#define SYSCALL_FREE_15           0x15
-#define SYSCALL_FREE_16           0x16
-#define SYSCALL_FREE_17           0x17
-#define SYSCALL_FREE_18           0x18
+//                                0x13
+#define SYSCALL_TIM_ALLOC         0x14
+#define SYSCALL_TIM_START         0x15
+#define SYSCALL_TIM_STOP          0x16
+//                                0x17
+//                                0x18
 #define SYSCALL_CTX_SWITCH        0x19
 #define SYSCALL_VOBJ_GET_VBASE    0x1A
-#define SYSCALL_GET_XY            0x1B
-#define SYSCALL_NIC_CMA_START     0x1C
-#define SYSCALL_NIC_CMA_STOP      0x1D
-#define SYSCALL_NIC_SYNC_READ     0x1E
-#define SYSCALL_NIC_SYNC_WRITE    0x1F
+#define SYSCALL_VOBJ_GET_LENGTH   0x1B
+#define SYSCALL_GET_XY            0x1C
+#define SYSCALL_NIC_ALLOC         0x1D
+#define SYSCALL_NIC_SYNC_SEND     0x1E
+#define SYSCALL_NIC_SYNC_RECEIVE  0x1F
 
 #define SYSCALL_FAT_OPEN          0x20
@@ -56,4 +56,14 @@
 #define SYSCALL_FAT_FSTAT         0x24
 #define SYSCALL_FAT_CLOSE         0x25
+//                                0x26
+//                                0x27
+//                                0x28
+//                                0x29
+//                                0x2A
+//                                0x2B
+//                                0x2C
+//                                0x2D
+//                                0x2E
+//                                0x2F
 
 //////////////////////////////////////////////////////////////////////////////////
@@ -67,4 +77,5 @@
 // It writes the system call arguments in the proper registers,
 // and tells GCC what has been modified by system call execution.
+// Returns -1 to signal an error.
 //////////////////////////////////////////////////////////////////////////////////
 static inline int sys_call( int call_no,
@@ -110,12 +121,7 @@
 
 //////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
 //               MIPS32 related system calls 
 //////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-
-//////////////////////////////////////////////////////////////////////////
-// This function returns the processor (x,y,lpid) identifier: 
-// (x,y) are the cluster coordinates / lpid is the local processor index.
+
 //////////////////////////////////////////////////////////////////////////
 extern void giet_proc_xyp( unsigned int* cluster_x,
@@ -123,219 +129,83 @@
                            unsigned int* lpid );
 
-//////////////////////////////////////////////////////////////////////////
-// This function returns the local processor time.
-//////////////////////////////////////////////////////////////////////////
-extern int giet_proctime();
-
-//////////////////////////////////////////////////////////////////////////
-// This function returns a pseudo-random value derived from the processor 
-// cycle count. This value is comprised between 0 & 65535.
-/////////////////////////////////////////////////////////////////////////
-extern int giet_rand();
-
-//////////////////////////////////////////////////////////////////////////
+extern unsigned int giet_proctime();
+
+extern unsigned int giet_rand();
+
+//////////////////////////////////////////////////////////////////////////
+//                    Task context system calls
+//////////////////////////////////////////////////////////////////////////
+
+extern unsigned int giet_proc_task_id();
+
+extern unsigned int giet_global_task_id(); 
+
+extern unsigned int giet_thread_id(); 
+
 //////////////////////////////////////////////////////////////////////////
 //             TTY device related system calls 
 //////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-
-//////////////////////////////////////////////////////////////////////////
-// This function is a modified version of the mutek_printf().
-// It uses a private terminal allocated to the calling task in the boot.
-// ("use_tty" argument in xml mapping), and does not take the TTY lock.
-// It calls several times the _tty_write system function.
-// Only a limited number of formats are supported:
-//   - %d : signed decimal
-//   - %u : unsigned decimal
-//   - %x : 32 bits hexadecimal
-//   - %l : 64 bits hexadecimal
-//   - %c : char
-//   - %s : string
-// In case or error returned by syscall, it makes a giet_exit().
-//////////////////////////////////////////////////////////////////////////
+
+extern void giet_tty_alloc();
+
 extern void giet_tty_printf( char* format, ... );
 
-//////////////////////////////////////////////////////////////////////////
-// This function is a modified version of the mutek_printf().
-// It uses the kernel TTY0 as a shared terminal, and it takes the
-// TTY lock to get exclusive access during the format display.
-// It calls several times the _tty_write system function.
-// Only a limited number of formats are supported:
-//   - %d : signed decimal
-//   - %u : unsigned decimal
-//   - %x : 32 bits hexadecimal
-//   - %l : 64 bits hexadecimal
-//   - %c : char
-//   - %s : string
-// In case or error returned by syscall, it makes a giet_exit().
-//////////////////////////////////////////////////////////////////////////
 extern void giet_shr_printf( char* format, ... );
 
-//////////////////////////////////////////////////////////////////////////
-// This blocking function fetches a single character from the private
-// terminal allocated to the calling task in the boot.
-// It uses the TTY_RX_IRQ interrupt, and the associated kernel buffer.
-// In case or error returned by syscall, it makes a giet_exit().
-//////////////////////////////////////////////////////////////////////////
 extern void giet_tty_getc( char* byte );
 
-//////////////////////////////////////////////////////////////////////////
-// This blocking function fetches a string from the private terminal 
-// allocated to the calling task to a fixed length buffer.
-// The terminal index must be defined in the task context in the boot.
-// It uses the TTY_RX_IRQ interrupt, and the associated kernel buffer.
-// - Up to (bufsize - 1) characters (including the non printable characters)
-//   are copied into buffer, and the string is completed by a NUL character.
-// - The <LF> character is interpreted, and the function close the string
-//   with a NUL character if <LF> is read.
-// - The <DEL> character is interpreted, and the corresponding character(s) 
-//   are removed from the target buffer.
-// - It does not provide an echo.
-// In case or error returned by syscall, it makes a giet_exit().
-/////////////////////////////////////////////////////////////////////////
 extern void giet_tty_gets( char* buf, unsigned int bufsize );
 
-/////////////////////////////////////////////////////////////////////////
-// This blocking function fetches a string of decimal characters (most
-// significant digit first) to build a 32-bit unsigned integer from
-// the private TTY terminal allocated to the calling task. 
-// The terminal index must be defined in the task context in the boot.
-// It uses the TTY_RX_IRQ interrupt, and the associated kernel buffer.
-// - The non-blocking system function _tty_read is called several times,
-//   and the decimal characters are written in a 32 characters buffer 
-//   until a <LF> character is read.
-// - It ignores non-decimal characters, and displays an echo 
-//   system function) for each decimal character.
-// - The <DEL> character is interpreted, and previous characters can be cancelled. 
-// - When the <LF> character is received, the string is converted to an
-//   unsigned int value. If the number of decimal digit is too large for the 32
-//   bits range, the zero value is returned.
-// In case or error returned by syscall, it makes a giet_exit().
-//////////////////////////////////////////////////////////////////////////
 extern void giet_tty_getw( unsigned int* val );
 
 //////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
 //                TIMER device related system calls 
 //////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-
-//////////////////////////////////////////////////////////////////////////
-// This function activates the private user timer allocated 
-// to the calling task in the boot phase.
-// In case or error returned by syscall, it makes a giet_exit().
-//////////////////////////////////////////////////////////////////////////
-extern void giet_timer_start();
-
-//////////////////////////////////////////////////////////////////////////
-// This function stops the private user timer allocated 
-// to the calling task.
-// In case or error returned by syscall, it makes a giet_exit().
-//////////////////////////////////////////////////////////////////////////
+
+extern void giet_timer_alloc();
+
+extern void giet_timer_start( unsigned int period );
+
 extern void giet_timer_stop();
  
 //////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
 //                Frame buffer device related system calls 
 //////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-
-//////////////////////////////////////////////////////////////////////////
-// This blocking function use a memory copy strategy to transfer data 
-// from the frame buffer device in kernel space to an user buffer.
-//     offset : offset (in bytes) in the frame buffer
-//     buffer : base address of the user buffer
-//     length : number of bytes to be transfered
-// In case or error returned by syscall, it makes a giet_exit().
-//////////////////////////////////////////////////////////////////////////
-extern void giet_fb_sync_read( unsigned int offset, 
-                               void*        buffer, 
-                               unsigned int length );
-
-//////////////////////////////////////////////////////////////////////////
-// This blocking function use a memory copy strategy to transfer data 
-// from a user buffer to the frame buffer device in kernel space.
-//     offset : offset (in bytes) in the frame buffer
-//     buffer : base address of the memory buffer
-//     length : number of bytes to be transfered
-// In case or error returned by syscall, it makes a giet_exit().
-//////////////////////////////////////////////////////////////////////////
-extern void giet_fb_sync_write( unsigned int offset, 
+
+extern void giet_fbf_cma_alloc();
+
+extern void giet_fbf_cma_start( void*        buf0, 
+                                void*        buf1,
+                                unsigned int length );
+
+extern void giet_fbf_cma_display( unsigned int buffer );
+
+extern void giet_fbf_cma_stop();
+
+extern void giet_fbf_sync_read( unsigned int offset, 
                                 void*        buffer, 
                                 unsigned int length );
 
-//////////////////////////////////////////////////////////////////////////
-// This function initializes the two chbuf SRC an DST used by the CMA 
-// controller and activates the CMA channel allocated to the calling task.
-// - buf0   : first user buffer virtual address
-// - buf1   : second user buffer virtual address
-// - length : buffer size (bytes)
-// In case or error returned by syscall, it makes a giet_exit().
-//////////////////////////////////////////////////////////////////////////
-extern void giet_fb_cma_init( void*        buf0, 
-                              void*        buf1,
-                              unsigned int length );
-
-//////////////////////////////////////////////////////////////////////////
-// This function initializes the two chbuf SRC an DST used by the CMA 
-// controller and activates the CMA channel allocated to the calling task.
-// - buf0   : first user buffer virtual address
-// - buf0   : second user buffer virtual address
-// - length : buffer size (bytes)
-// In case or error returned by syscall, it makes a giet_exit().
-//////////////////////////////////////////////////////////////////////////
-extern void giet_fb_cma_write( unsigned int buf_id );
-
-//////////////////////////////////////////////////////////////////////////
-// This function desactivates the CMA channel allocated to the task.
-// In case or error returned by syscall, it makes a giet_exit().
-//////////////////////////////////////////////////////////////////////////
-extern void giet_fb_cma_stop();
-
-//////////////////////////////////////////////////////////////////////////
+extern void giet_fbf_sync_write( unsigned int offset, 
+                                 void*        buffer, 
+                                 unsigned int length );
+
 //////////////////////////////////////////////////////////////////////////
 //                  NIC related system calls 
 //////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-
-//////////////////////////////////////////////////////////////////////////
-// This function initializes the memory chbuf used by the CMA controller, 
-// activates the NIC channel allocated to the calling task, 
-// and activates the two CMA channels.
-// - tx     : RX channel if 0 / TX channel if non 0
-// - buf0   : first user buffer virtual address
-// - buf1   : second user buffer virtual address
-// - length : buffer size (bytes)
-// In case or error returned by syscall, it makes a giet_exit().
-//////////////////////////////////////////////////////////////////////////
-extern void giet_nic_cma_start();
-
-//////////////////////////////////////////////////////////////////////////
-// This function desactivates the NIC channel and the two CMA channels
-// allocated to the calling task.
-// In case or error returned by syscall, it makes a giet_exit().
-//////////////////////////////////////////////////////////////////////////
-extern void giet_nic_cma_stop();
-
-//////////////////////////////////////////////////////////////////////////
+
+extern void giet_nic_alloc();
+
+extern void giet_nic_sync_send( void* buffer);
+
+extern void giet_nic_sync_receive( void* buffer );
+
 //////////////////////////////////////////////////////////////////////////
 //               FAT related system calls 
 //////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-
-//////////////////////////////////////////////////////////////////////////
-// Open a file identified by a pathname, and contained in the system FAT.
-// The read/write flags are not supported yet: no effect.
-// Return -1 in case or error.
-//////////////////////////////////////////////////////////////////////////
+
 extern int giet_fat_open(  const char*  pathname,
                            unsigned int flags );
 
-///////////////////////////////////////////////////////////////////////////////////
-// Read "count" sectors from a file identified by "fd", skipping "offset"
-// sectors in file, and writing into the user "buffer". 
-// The user buffer base address shoulb be 64 bytes aligned.
-// In case or error returned by syscall, it makes a giet_exit().
-///////////////////////////////////////////////////////////////////////////////////
 extern void giet_fat_read(  unsigned int fd,
                             void*        buffer,
@@ -343,10 +213,4 @@
                             unsigned int offset );
 
-///////////////////////////////////////////////////////////////////////////////////
-// Write "count" sectors into a file identified by "fd", skipping "offset"
-// sectors in file, and reading from the user "buffer". 
-// The user buffer base address shoulb be 64 bytes aligned.
-// In case or error returned by syscall, it makes a giet_exit().
-///////////////////////////////////////////////////////////////////////////////////
 extern void giet_fat_write( unsigned int fd,
                             void*        buffer,
@@ -354,98 +218,34 @@
                             unsigned int offset );
 
-///////////////////////////////////////////////////////////////////////////////////
-// Change the lseek file pointer value for a file identified by "fd".
-// In case or error returned by syscall, it makes a giet_exit().
-///////////////////////////////////////////////////////////////////////////////////
 extern void giet_fat_lseek( unsigned int fd,
                             unsigned int offset,
                             unsigned int whence );
 
-///////////////////////////////////////////////////////////////////////////////////
-// Returns general informations of a file identified by "fd". 
-// (Only the file_size in sectors for this moment)
-///////////////////////////////////////////////////////////////////////////////////
 extern void giet_fat_fstat( unsigned int fd );
 
-//////////////////////////////////////////////////////////////////////////
-// Close a file identified by "fd".
-//////////////////////////////////////////////////////////////////////////
 extern void giet_fat_close( unsigned int fd );
 
 //////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-//                    Task context system calls
-//////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-
-//////////////////////////////////////////////////////////////////////////
-// This functions returns the local task id.
-// If processor has n tasks the local task index is ranging from 0 to n-1
-//////////////////////////////////////////////////////////////////////////
-extern int giet_proc_task_id();
-
-//////////////////////////////////////////////////////////////////////////
-// This functions returns the global task id, (unique in the system).
-//////////////////////////////////////////////////////////////////////////
-extern int giet_global_task_id(); 
-
-//////////////////////////////////////////////////////////////////////////
-// This functions returns the thread index of the task in its vspace.
-//////////////////////////////////////////////////////////////////////////
-extern int giet_thread_id(); 
-
-//////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
 //                    Miscelaneous system calls
 //////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-
-//////////////////////////////////////////////////////////////////////////
-// This function stops execution of the calling task with a TTY message, 
-// the user task is descheduled and becomes not runable. 
-// It does not consume processor cycles anymore.
-//////////////////////////////////////////////////////////////////////////
+
 extern void giet_exit( char* string );
 
-//////////////////////////////////////////////////////////////////////////
-// This function uses the giet_exit() system call
-// and kill the calling task if the condition is false.
-//////////////////////////////////////////////////////////////////////////
 extern void giet_assert( unsigned int condition, 
                          char*        string );
 
-//////////////////////////////////////////////////////////////////////////
-// The user task calling this function is descheduled and
-// the processor is allocated to another task.
-//////////////////////////////////////////////////////////////////////////
 extern void giet_context_switch();
 
-//////////////////////////////////////////////////////////////////////////
-// This function writes in argument "vobj_vaddr" the virtual base address 
-// of a vobj (defined in the mapping_info data structure), identified by 
-// the two arguments "vspace_name" and "vobj_name".
-// In case or error returned by syscall, it makes a giet_exit().
-// ( vobj not defined or wrong vspace )
-//////////////////////////////////////////////////////////////////////////
+extern void giet_procnumber( unsigned int cluster_xy,
+                             unsigned int buffer );
+
 extern void giet_vobj_get_vbase( char*         vspace_name, 
                                  char*         vobj_name, 
                                  unsigned int* vobj_vaddr);
 
-//////////////////////////////////////////////////////////////////////////
-// This function returns in the "buffer" argument the number of processors 
-// in the cluster specified by the "cluster_xy" argument.
-// In case or error returned by syscall, it makes a giet_exit().
-//////////////////////////////////////////////////////////////////////////
-extern void giet_procnumber( unsigned int cluster_xy,
-                             unsigned int buffer );
-
-//////////////////////////////////////////////////////////////////////////
-// This function supports access to the task's heap or to a remote heap:
-// - If (x < X_SIZE) and (y < Y_SIZE), this function returns the base 
-//   address and length of the heap associated to any task running 
-//   on cluster(x,y) => remote heap
-// - Else, this function returns the base address and length of the 
-//   heap associated to the calling task => local heap
-//////////////////////////////////////////////////////////////////////////
+extern void giet_vobj_get_length( char*         vspace_name, 
+                                  char*         vobj_name, 
+                                  unsigned int* vobj_vaddr);
+
 extern void giet_heap_info( unsigned int* vaddr, 
                             unsigned int* length,
@@ -453,10 +253,4 @@
                             unsigned int  y );
 
-//////////////////////////////////////////////////////////////////////////
-// This function takes as input a virtual address (ptr argument), 
-// and returns through the (px,py) arguments the coordinates of 
-// the cluster containing the physical address associated to ptr. 
-// In case of error (unmapped virtual address), it makes a giet_exit().
-//////////////////////////////////////////////////////////////////////////
 extern void giet_get_xy( void*          ptr, 
                          unsigned int*  px,
