Index: soft/giet_vm/libs/stdio.c
===================================================================
--- soft/giet_vm/libs/stdio.c	(revision 238)
+++ soft/giet_vm/libs/stdio.c	(revision 253)
@@ -13,31 +13,36 @@
 #include <stdio.h>
 
-#define SYSCALL_PROCID          0x00
-#define SYSCALL_PROCTIME        0x01
-#define SYSCALL_TTY_WRITE       0x02
-#define SYSCALL_TTY_READ        0x03
-#define SYSCALL_TIMER_START     0x04
-#define SYSCALL_TIMER_STOP      0x05
-#define SYSCALL_GCD_WRITE       0x06
-#define SYSCALL_GCD_READ        0x07
-#define SYSCALL_HEAP_INFO       0x08
-#define SYSCALL_PROC_TASK_ID    0x09
-#define SYSCALL_GLOBAL_TASK_ID  0x0A
-#define SYSCALL_CTX_SWITCH      0x0D
-#define SYSCALL_EXIT            0x0E
-#define SYSCALL_PROC_NUMBER     0x0F
-#define SYSCALL_FB_SYNC_WRITE   0x10
-#define SYSCALL_FB_SYNC_READ    0x11
-#define SYSCALL_FB_WRITE        0x12
-#define SYSCALL_FB_READ         0x13
-#define SYSCALL_FB_COMPLETED    0x14
-#define SYSCALL_IOC_WRITE       0x15
-#define SYSCALL_IOC_READ        0x16
-#define SYSCALL_IOC_COMPLETED   0x17
-#define SYSCALL_IOC_BLOCK_SIZE  0x18
-#define SYSCALL_VOBJ_GET_VBASE  0x1A
-#define SYSCALL_NIC_WRITE       0x1B
-#define SYSCALL_NIC_READ        0x1C
-#define SYSCALL_NIC_COMPLETED   0x1D
+#define SYSCALL_PROCID            0x00
+#define SYSCALL_PROCTIME          0x01
+#define SYSCALL_TTY_WRITE         0x02
+#define SYSCALL_TTY_READ          0x03
+#define SYSCALL_TIMER_START       0x04
+#define SYSCALL_TIMER_STOP        0x05
+#define SYSCALL_GCD_WRITE         0x06
+#define SYSCALL_GCD_READ          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_EXIT              0x0E
+#define SYSCALL_PROC_NUMBER       0x0F
+#define SYSCALL_FB_SYNC_WRITE     0x10
+#define SYSCALL_FB_SYNC_READ      0x11
+#define SYSCALL_FB_DMA_WRITE      0x12
+#define SYSCALL_FB_DMA_READ       0x13
+#define SYSCALL_FB_DMA_COMPLETED  0x14
+#define SYSCALL_IOC_WRITE         0x15
+#define SYSCALL_IOC_READ          0x16
+#define SYSCALL_IOC_COMPLETED     0x17
+#define SYSCALL_IOC_BLOCK_SIZE    0x18
+#define SYSCALL_CTX_SWITCH        0x19
+#define SYSCALL_VOBJ_GET_VBASE    0x1A
+#define SYSCALL_NIC_CMA_RX_INIT   0x1B
+#define SYSCALL_NIC_CMA_TX_INIT   0x1C
+#define SYSCALL_NIC_CMA_STOP      0x1D
+#define SYSCALL_NIC_SYNC_READ     0x1E
+#define SYSCALL_NIC_SYNC_WRITE    0x1F
 
 //////////////////////////////////////////////////////////////////////////////////
@@ -47,9 +52,10 @@
 // and tells GCC what has been modified by system call execution.
 //////////////////////////////////////////////////////////////////////////////////
-static inline unsigned int sys_call(unsigned int call_no,
-        unsigned int arg_0, 
-        unsigned int arg_1, 
-        unsigned int arg_2, 
-        unsigned int arg_3) {
+static inline unsigned int sys_call( unsigned int call_no,
+                                     unsigned int arg_0, 
+                                     unsigned int arg_1, 
+                                     unsigned int arg_2, 
+                                     unsigned int arg_3 ) 
+{
     register unsigned int reg_no_and_output asm("v0") = call_no;
     register unsigned int reg_a0 asm("a0") = arg_0;
@@ -109,5 +115,5 @@
 
 
-//////     TTY device related system calls /////
+//////  TTY device related system calls /////
 
 ////////////////////////////////////////////////////////////////////////////////////
@@ -123,6 +129,4 @@
     return sys_call(SYSCALL_TTY_WRITE, (unsigned int) (&byte), 1, 0, 0);
 }
-
-
 ////////////////////////////////////////////////////////////////////////////////////
 // giet_tty_puts()
@@ -140,6 +144,4 @@
     return sys_call(SYSCALL_TTY_WRITE, (unsigned int) buf, length, 0, 0);
 }
-
-
 ////////////////////////////////////////////////////////////////////////////////////
 // giet_tty_putw()
@@ -161,6 +163,4 @@
     return sys_call(SYSCALL_TTY_WRITE, (unsigned int) buf, 10, 0, 0);
 }
-
-
 ////////////////////////////////////////////////////////////////////////////////////
 // giet_tty_getc()
@@ -180,6 +180,4 @@
     return 0;
 }
-
-
 ////////////////////////////////////////////////////////////////////////////////////
 // giet_tty_gets()
@@ -226,6 +224,4 @@
     return 0;
 }
-
-
 ////////////////////////////////////////////////////////////////////////////////////
 // giet_tty_getw()
@@ -325,6 +321,4 @@
     return 0;
 }
-
-
 ////////////////////////////////////////////////////////////////////////////////////
 // giet_tty_printf()
@@ -448,9 +442,8 @@
 // - Returns 0 if success, > 0 if error.
 //////////////////////////////////////////////////////////////////////////////////
-unsigned int giet_timer_start() {
+unsigned int giet_timer_start() 
+{
     return sys_call(SYSCALL_TIMER_START, 0, 0, 0, 0);
 }
-
-
 //////////////////////////////////////////////////////////////////////////////////
 // giet_timer_stop()
@@ -459,5 +452,6 @@
 // - Returns 0 if success, > 0 if error.
 //////////////////////////////////////////////////////////////////////////////////
-unsigned int giet_timer_stop() {
+unsigned int giet_timer_stop() 
+{
     return sys_call(SYSCALL_TIMER_STOP, 0, 0, 0, 0);
 }
@@ -477,9 +471,8 @@
 // - Returns 0 if success, > 0 if error.
 //////////////////////////////////////////////////////////////////////////////////
-unsigned int giet_gcd_set_opa(unsigned int val) {
+unsigned int giet_gcd_set_opa(unsigned int val) 
+{
     return sys_call(SYSCALL_GCD_WRITE, GCD_OPA, val, 0, 0);
 }
-
-
 //////////////////////////////////////////////////////////////////////////////////
 //     giet_gcd_set_opb()
@@ -488,9 +481,8 @@
 // - Returns 0 if success, > 0 if error.
 //////////////////////////////////////////////////////////////////////////////////
-unsigned int giet_gcd_set_opb(unsigned int val) {
+unsigned int giet_gcd_set_opb(unsigned int val) 
+{
     return sys_call(SYSCALL_GCD_WRITE, GCD_OPB, val, 0, 0);
 }
-
-
 //////////////////////////////////////////////////////////////////////////////////
 //     giet_gcd_start()
@@ -499,9 +491,8 @@
 // - Returns 0 if success, > 0 if error.
 //////////////////////////////////////////////////////////////////////////////////
-unsigned int giet_gcd_start() {
+unsigned int giet_gcd_start() 
+{
     return sys_call(SYSCALL_GCD_WRITE, GCD_START, 0, 0, 0);
 }
-
-
 //////////////////////////////////////////////////////////////////////////////////
 //     giet_gcd_get_status()
@@ -510,9 +501,8 @@
 // - The value is 0 when the coprocessor is idle (computation completed).
 //////////////////////////////////////////////////////////////////////////////////
-unsigned int giet_gcd_get_status(unsigned int * val) {
+unsigned int giet_gcd_get_status(unsigned int * val) 
+{
     return sys_call(SYSCALL_GCD_READ, GCD_STATUS, (unsigned int) val, 0, 0);
 }
-
-
 //////////////////////////////////////////////////////////////////////////////////
 //     giet_gcd_get_result()
@@ -520,5 +510,6 @@
 // This function gets the result of the computation from the GCD coprocessor.
 //////////////////////////////////////////////////////////////////////////////////
-unsigned int giet_gcd_get_result(unsigned int * val) {
+unsigned int giet_gcd_get_result(unsigned int * val) 
+{
     return sys_call(SYSCALL_GCD_READ, GCD_OPA, (unsigned int) val, 0, 0);
 }
@@ -536,9 +527,10 @@
 // - Returns 0 if success, > 0 if error (e.g. memory buffer not in user space).
 //////////////////////////////////////////////////////////////////////////////////
-unsigned int giet_ioc_write( unsigned int lba, void * buffer, unsigned int count) {
+unsigned int giet_ioc_write( unsigned int lba, 
+                             void *       buffer, 
+                             unsigned int count) 
+{
     return sys_call(SYSCALL_IOC_WRITE, lba, (unsigned int) buffer, count, 0);
 }
-
-
 //////////////////////////////////////////////////////////////////////////////////
 // giet_ioc_read()
@@ -550,9 +542,10 @@
 // - Returns 0 if success, > 0 if error (e.g. memory buffer not in user space).
 //////////////////////////////////////////////////////////////////////////////////
-unsigned int giet_ioc_read(unsigned int lba, void * buffer, unsigned int count) {
+unsigned int giet_ioc_read( unsigned int lba, 
+                            void *       buffer, 
+                            unsigned int count ) 
+{
     return sys_call(SYSCALL_IOC_READ, lba, (unsigned int) buffer, count, 0);
 }
-
-
 //////////////////////////////////////////////////////////////////////////////////
 // giet_ioc_completed()
@@ -561,9 +554,8 @@
 // successfully completed, and returns 1 if an address error has been detected.
 //////////////////////////////////////////////////////////////////////////////////
-unsigned int giet_ioc_completed() {
+unsigned int giet_ioc_completed() 
+{
     return sys_call(SYSCALL_IOC_COMPLETED, 0, 0, 0, 0);
 }
-
-
 //////////////////////////////////////////////////////////////////////////////////
 // giet_ioc_block_size()
@@ -571,5 +563,6 @@
 // This blocking function returns the block_size (in bytes) of the block device
 //////////////////////////////////////////////////////////////////////////////////
-unsigned int giet_ioc_block_size() {
+unsigned int giet_ioc_block_size() 
+{
     return sys_call(SYSCALL_IOC_BLOCK_SIZE, 0, 0, 0, 0);
 }
@@ -588,9 +581,10 @@
 // - Returns 0 if success, > 0 if error (e.g. memory buffer not in user space).
 //////////////////////////////////////////////////////////////////////////////////
-unsigned int giet_fb_sync_write(unsigned int offset, void * buffer, unsigned int length) {
+unsigned int giet_fb_sync_write( unsigned int offset, 
+                                 void *       buffer, 
+                                 unsigned int length ) 
+{
     return sys_call(SYSCALL_FB_SYNC_WRITE, offset, (unsigned int) buffer, length, 0);
 }
-
-
 //////////////////////////////////////////////////////////////////////////////////
 // giet_fb_sync_read()
@@ -603,11 +597,12 @@
 // - Returns 0 if success, > 0 if error (e.g. memory buffer not in user space).
 //////////////////////////////////////////////////////////////////////////////////
-unsigned int giet_fb_sync_read(unsigned int offset, void * buffer, unsigned int length) {
+unsigned int giet_fb_sync_read( unsigned int offset, 
+                                void *       buffer, 
+                                unsigned int length ) 
+{
     return sys_call(SYSCALL_FB_SYNC_READ, offset, (unsigned int) buffer, length, 0);
 }
-
-
-//////////////////////////////////////////////////////////////////////////////////
-// giet_fb_write()
+//////////////////////////////////////////////////////////////////////////////////
+// giet_fb_dma_write()
 //////////////////////////////////////////////////////////////////////////////////
 // This non-blocking function use the DMA coprocessor to transfer data from a
@@ -620,11 +615,12 @@
 // - Returns 0 if success, > 0 if error (e.g. memory buffer not in user space).
 //////////////////////////////////////////////////////////////////////////////////
-unsigned int giet_fb_write(unsigned int offset, void * buffer, unsigned int length) {
-    return sys_call(SYSCALL_FB_WRITE, offset, (unsigned int) buffer, length, 0);
-}
-
-
-//////////////////////////////////////////////////////////////////////////////////
-// giet_fb_read()
+unsigned int giet_fb_dma_write( unsigned int offset, 
+                                void *       buffer, 
+                                unsigned int length ) 
+{
+    return sys_call(SYSCALL_FB_DMA_WRITE, offset, (unsigned int) buffer, length, 0);
+}
+//////////////////////////////////////////////////////////////////////////////////
+// giet_fb_dma_read()
 //////////////////////////////////////////////////////////////////////////////////
 // This non-blocking function use the DMA coprocessor to transfer data from the
@@ -637,68 +633,110 @@
 // - Returns 0 if success, > 0 if error (e.g. memory buffer not in user space).
 //////////////////////////////////////////////////////////////////////////////////
-unsigned int giet_fb_read(unsigned int offset, void * buffer, unsigned int length) {
-    return sys_call(SYSCALL_FB_READ, offset, (unsigned int) buffer, length, 0);
-}
-
-
-//////////////////////////////////////////////////////////////////////////////////
-// giet_fb_completed()
+unsigned int giet_fb_dma_read( unsigned int offset, 
+                               void *       buffer, 
+                               unsigned int length ) 
+{
+    return sys_call(SYSCALL_FB_DMA_READ, offset, (unsigned int) buffer, length, 0);
+}
+//////////////////////////////////////////////////////////////////////////////////
+// giet_fb_dma_completed()
 //////////////////////////////////////////////////////////////////////////////////
 // This blocking function returns when the transfer is completed.
 // - Returns 0 if success, > 0 if error.
 //////////////////////////////////////////////////////////////////////////////////
-unsigned int giet_fb_completed() {
-    return sys_call(SYSCALL_FB_COMPLETED, 0, 0, 0, 0);
-}
-
-
-//////////////////////////////////////////////////////////////////////////////////
-// giet_nic_write()
-//////////////////////////////////////////////////////////////////////////////////
-// This non-blocking function use the DMA coprocessor to transfer data from the
-// NIC device to an user buffer.
-// - offset : offset (in bytes) in the NIC
-// - buffer : base address of the memory buffer
-// - length : number of bytes to be transfered
-// The transfer completion is signaled by an IRQ, and must be tested by the
-// nic_completed() function.
+unsigned int giet_fb_dma_completed() 
+{
+    return sys_call(SYSCALL_FB_DMA_COMPLETED, 0, 0, 0, 0);
+}
+//////////////////////////////////////////////////////////////////////////////////
+// giet_fb_cma_init()
+//////////////////////////////////////////////////////////////////////////////////
+// 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)
+// - Returns 0 if success, > 0 if error.
+//////////////////////////////////////////////////////////////////////////////////
+unsigned int giet_fb_cma_init( void *       buf0,
+                               void *       buf1,
+                               unsigned int length )
+{
+    return sys_call(SYSCALL_FB_CMA_INIT, (unsigned int)buf0, (unsigned int)buf1, length, 0);
+}
+//////////////////////////////////////////////////////////////////////////////////
+// giet_fb_cma_write()
+//////////////////////////////////////////////////////////////////////////////////
+// This function set the valid status for one of the SRC user buffer.
+// and reset the valid status for the DST frame buffer.
+// - bufffer_id : 0 => buf0 valid is set / not 0  => buf1 valid is set
+// - Returns 0 if success, > 0 if error.
+//////////////////////////////////////////////////////////////////////////////////
+unsigned int giet_fb_cma_write( unsigned int buffer_id )
+{
+    return sys_call(SYSCALL_FB_CMA_WRITE, buffer_id, 0, 0, 0);
+}
+//////////////////////////////////////////////////////////////////////////////////
+// giet_fb_cma_stop()
+//////////////////////////////////////////////////////////////////////////////////
+// This function desactivates the CMA channel allocated to the calling task.
+// - Returns 0 if success, > 0 if error.
+//////////////////////////////////////////////////////////////////////////////////
+unsigned int giet_fb_cma_stop( )
+{
+    return sys_call(SYSCALL_FB_CMA_STOP, 0, 0, 0, 0);
+}
+
+
+//////// NIC related system calls ////////
+
+//////////////////////////////////////////////////////////////////////////////////
+// giet_nic_cma_rx_init()
+//////////////////////////////////////////////////////////////////////////////////
+// This function initializes the two chbuf SRC an DST used by the CMA controller 
+// and activates the NIC RX channel allocated to the calling task, and the 
+// CMA channel used for RX transfer.
+// - buf0   : first user buffer virtual address
+// - buf0   : second user buffer virtual address
+// - length : buffer size (bytes)
 // - Returns 0 if success, > 0 if error (e.g. memory buffer not in user space).
 //////////////////////////////////////////////////////////////////////////////////
-
-unsigned int giet_nic_write(unsigned int offset, void * buffer, unsigned int length) {
-    return sys_call(SYSCALL_NIC_WRITE, offset, (unsigned int) buffer, length, 0);
-}
-
-
-//////////////////////////////////////////////////////////////////////////////////
-// giet_nic_read()
-//////////////////////////////////////////////////////////////////////////////////
-// This non-blocking function use the DMA coprocessor to transfer data from the
-// NIC device to an user buffer.
-// - offset : offset (in bytes) in the NIC
-// - buffer : base address of the memory buffer
-// - length : number of bytes to be transfered
-// The transfer completion is signaled by an IRQ, and must be tested by the
-// nic_completed() function.
+unsigned int giet_nic_cma_rx_init( void *       buf0,
+                                   void *       buf1,
+                                   unsigned int length ) 
+{
+    return sys_call(SYSCALL_NIC_CMA_RX_INIT, (unsigned int)buf0, (unsigned int)buf1, length, 0);
+}
+//////////////////////////////////////////////////////////////////////////////////
+// giet_nic_cma_tx_init()
+//////////////////////////////////////////////////////////////////////////////////
+// This function initializes the two chbuf SRC an DST used by the CMA controller 
+// and activates the NIC TX channel allocated to the calling task, and the two
+// CMA channel used for TX transfer.
+// - buf0   : first user buffer virtual address
+// - buf0   : second user buffer virtual address
+// - length : buffer size (bytes)
 // - Returns 0 if success, > 0 if error (e.g. memory buffer not in user space).
 //////////////////////////////////////////////////////////////////////////////////
-
-unsigned int giet_nic_read(unsigned int offset, void * buffer, unsigned int length) {
-    return sys_call(SYSCALL_NIC_READ, offset, (unsigned int) buffer, length, 0);
-}
-
-
-//////////////////////////////////////////////////////////////////////////////////
-// giet_nic_completed()
-//////////////////////////////////////////////////////////////////////////////////
-// This blocking function returns when the transfer is completed.
-// - Returns 0 if success, > 0 if error.
-//////////////////////////////////////////////////////////////////////////////////
-unsigned int giet_nic_completed() {
-    return sys_call(SYSCALL_NIC_COMPLETED, 0, 0, 0, 0);
-}
-
-
-///// Miscellaneous related system calls /////
+unsigned int giet_nic_cma_tx_init( void *       buf0,
+                                   void *       buf1,
+                                   unsigned int length ) 
+{
+    return sys_call(SYSCALL_NIC_CMA_TX_INIT, (unsigned int)buf0, (unsigned int)buf1, length, 0);
+}
+//////////////////////////////////////////////////////////////////////////////////
+// giet_nic_cma_stop()
+//////////////////////////////////////////////////////////////////////////////////
+// This function desactivates the NIC channel and the two CMA channels
+// allocated to the calling task.
+// - Returns 0 if success, > 0 if error.
+//////////////////////////////////////////////////////////////////////////////////
+unsigned int giet_nic_cma_stop( )
+{
+    return sys_call(SYSCALL_NIC_CMA_STOP, 0, 0, 0, 0);
+}
+
+
+///// Miscellaneous system calls /////
 
 //////////////////////////////////////////////////////////////////////////////////
@@ -711,5 +749,9 @@
 // - Returns the address if success,  0 if error ( not defined or wrong type )
 //////////////////////////////////////////////////////////////////////////////////
-unsigned int giet_vobj_get_vbase(char * vspace_name, char * vobj_name, unsigned int vobj_type, unsigned int * vobj_vaddr) {
+unsigned int giet_vobj_get_vbase( char*         vspace_name, 
+                                  char*         vobj_name, 
+                                  unsigned int  vobj_type, 
+                                  unsigned int* vobj_vaddr ) 
+{
     return sys_call(SYSCALL_VOBJ_GET_VBASE, 
             (unsigned int) vspace_name,
@@ -718,6 +760,4 @@
             (unsigned int) vobj_vaddr);
 }
-
-
 ////////////////////////////////////////////////////////////////////////////////////
 // giet_proc_number()
@@ -727,22 +767,70 @@
 // - Returns 0 if success, > 0 if error ( cluster index too large )
 ////////////////////////////////////////////////////////////////////////////////////
-unsigned int giet_proc_number(unsigned int cluster_id, unsigned int * buffer) {
+unsigned int giet_proc_number( unsigned int  cluster_id, 
+                               unsigned int* buffer ) 
+{
     return sys_call(SYSCALL_PROC_NUMBER, cluster_id, (unsigned int) buffer, 0, 0);
 }
-
-
-/////  Miscellaneous system calls /////
-
-//////////////////////////////////////////////////////////////////////////////////
-// giet_task_exit()
+//////////////////////////////////////////////////////////////////////////////////
+// giet_exit()
 //////////////////////////////////////////////////////////////////////////////////
 // This function stops execution of the calling task with a TTY message, 
-// and enter an infinite loop.
-// The task is blocked, but it still consume processor cycles ...
-//////////////////////////////////////////////////////////////////////////////////
-void giet_exit() {
+// and the task is descheduled and becomes not runable. 
+// It does not consume processor cycles anymore.
+//////////////////////////////////////////////////////////////////////////////////
+void giet_exit() 
+{
     sys_call(SYSCALL_EXIT, 0, 0, 0, 0);
 }
-
+//////////////////////////////////////////////////////////////////////////////////
+// giet_context_switch()
+// The user task calling this function is descheduled and
+// the processor is allocated to another task.
+//////////////////////////////////////////////////////////////////////////////////
+unsigned int giet_context_switch() 
+{
+    return sys_call(SYSCALL_CTX_SWITCH, 0, 0, 0, 0);
+}
+//////////////////////////////////////////////////////////////////////////////////
+// giet_proc_task_id()
+// This functions returns the local task id, i.e. the processor task id (ranging
+// from 0 to n-1(p) for each processor if p has n tasks)
+//////////////////////////////////////////////////////////////////////////////////
+unsigned int giet_proc_task_id() 
+{
+    return sys_call(SYSCALL_LOCAL_TASK_ID, 0, 0, 0, 0);
+}
+//////////////////////////////////////////////////////////////////////////////////
+// giet_heap_info()
+// This function returns the base address and size of the current task's heap
+//////////////////////////////////////////////////////////////////////////////////
+unsigned int giet_heap_info( unsigned int* vaddr, 
+                             unsigned int* length) 
+{
+    return sys_call(SYSCALL_HEAP_INFO, (unsigned int)vaddr, (unsigned int)length, 0, 0);
+}
+//////////////////////////////////////////////////////////////////////////////////
+// giet_global_task_id()
+// This functions returns the global task id, which is unique in all the giet.
+//////////////////////////////////////////////////////////////////////////////////
+unsigned int giet_global_task_id() 
+{
+    return sys_call(SYSCALL_GLOBAL_TASK_ID, 0, 0, 0, 0);
+}
+///////////////////////////////////////////////////////////////////////////////////
+// giet_assert()
+// This function 
+///////////////////////////////////////////////////////////////////////////////////
+void giet_assert( unsigned int condition,
+                  char*        string )
+{
+    if ( condition == 0 )
+    {
+        giet_tty_puts( string );
+        giet_exit();
+    }
+}
+
+////// Pseudo system calls (no syscall instruction) ///////
 
 ///////////////////////////////////////////////////////////////////////////////////
@@ -751,5 +839,6 @@
 // count. This value is comprised between 0 & 65535.
 ///////////////////////////////////////////////////////////////////////////////////
-unsigned int giet_rand() {
+unsigned int giet_rand() 
+{
     unsigned int x = sys_call(SYSCALL_PROCTIME, 0, 0, 0, 0);
     if ((x & 0xF) > 7) {
@@ -761,39 +850,4 @@
 }
 
-
-//////////////////////////////////////////////////////////////////////////////////
-// giet_context_switch()
-// The user task calling this function is descheduled and
-// the processor is allocated to another task.
-//////////////////////////////////////////////////////////////////////////////////
-unsigned int giet_context_switch() {
-    return sys_call(SYSCALL_CTX_SWITCH, 0, 0, 0, 0);
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// giet_proc_task_id()
-// This functions returns the local task id, i.e. the processor task id (ranging
-// from 0 to n-1(p) for each processor if p has n tasks)
-//////////////////////////////////////////////////////////////////////////////////
-unsigned int giet_proc_task_id() {
-    return sys_call(SYSCALL_PROC_TASK_ID, 0, 0, 0, 0);
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// giet_heap_info()
-// This function returns the base address and size of the current task's heap
-//////////////////////////////////////////////////////////////////////////////////
-unsigned int giet_heap_info(unsigned int * vaddr, unsigned int * length) {
-    return sys_call(SYSCALL_HEAP_INFO, (unsigned int) vaddr, (unsigned int) length, 0, 0);
-}
-
-
-//////////////////////////////////////////////////////////////////////////////////
-// giet_global_task_id()
-// This functions returns the global task id, which is unique in all the giet
-//////////////////////////////////////////////////////////////////////////////////
-unsigned int giet_global_task_id() {
-    return sys_call(SYSCALL_GLOBAL_TASK_ID, 0, 0, 0, 0);
-}
 
 // Local Variables:
