Index: soft/giet_vm/giet_libs/stdio.c
===================================================================
--- soft/giet_vm/giet_libs/stdio.c	(revision 431)
+++ 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()");
 }
 
