Changes between Version 110 and Version 111 of library_stdio


Ignore:
Timestamp:
Sep 15, 2015, 6:15:58 PM (10 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • library_stdio

    v110 v111  
    3131 == __Thread related system calls__ ==
    3232
    33 The following system calls implement the POSIX Threads. The ''pthread_t'' and ''pthread_attr_t'' types
    34 are defined in the [source:soft/giet_vm/giet_libs/stdio.h stdio.h] file.
     33The GIET-VM support a subset of the POSIX Threads.
     34The ''pthread_t'' and ''pthread_attr_t'' types are defined in the [source:soft/giet_vm/giet_libs/stdio.h stdio.h] file.
    3535
    3636 === 1)  int '''giet_pthread_create'''( pthread_t*  buffer , pthread_attr_t* attr , void* function , void* arg ) ===
     
    105105 * In '''MODE_MWMR''', each channel FSM  implements the 7 steps MWMR protocol, and transfer an "infinite" data stream, between one coprocessor port and a MWMR software FIFO in memory. The ''giet_coproc_run()'' system call is non blocking, as the synchronisation is done through the MWMR FIFOs (no transfer completion event). The MWR IRQ is only asserted if a VCI error is reported in a memory access.
    106106 * In '''MODE_DMA_IRQ''' or '''MODE_DMA_NO_IRQ''', each channel FSM transfers a single buffer between one coprocessor port and the memory, and keep blocked when the transfer is completed.
    107    - In '''MODE_DMA_IRQ''', the calling task is descheduled, after coprocessor activation, in the ''giet_coproc_run()'' system call. It is rescheduled by the MWR IRQ signaling the global completion. The _mwr_isr() scan all channels status registers to report possible addressing errors, and reset the communication channels.
     107   - In '''MODE_DMA_IRQ''', the calling thread is descheduled, after coprocessor activation, in the ''giet_coproc_run()'' system call. It is rescheduled by the MWR IRQ signaling the global completion. The _mwr_isr() scan all channels status registers to report possible addressing errors, and reset the communication channels.
    108108   - In '''MODE_DMA_NO_IRQ''', the ''giet_coproc_run()'' system call returns after coprocessor activation, and the user application must use the blocking ''giet_coproc_completed()'' system call that directly scan the channels registers to detect  completion, report errors, and reset the channels.
    109109
     
    126126
    127127 === 1) void '''giet_coproc_alloc'''( unsigned int   coproc_type , unsigned int* coproc_info ) ===
    128 This function allocates a private coprocessor to the calling task, taking a lock to grant exclusive ownership, and register the coprocessor coordinates in the task context.
    129 In the current implementation, the task exit if there is no coprocessor of requested type in the same cluster as the calling task.
     128This function allocates a private coprocessor to the calling thread, taking a lock to grant exclusive ownership, and register the coprocessor coordinates in the thread context.
     129In the current implementation, the thread exit if there is no coprocessor of requested type in the same cluster as the calling thread.
    130130In case of success, it returns the coprocessor characteristics in the '''coproc_info''' variable.
    131131 * '''coproc_type''' : see supported types above.
     
    152152
    153153 === 4) void '''giet_coproc_completed'''( ) ===
    154 This blocking function can be used to synchronize a software task with an hardware coprocessor running in DMA_NO_IRQ mode.
     154This blocking function can be used to synchronize a software thread with an hardware coprocessor running in DMA_NO_IRQ mode.
    155155It polls the status register of all communication channels, and returns only when all transfers are completed.
    156156This function exit when at least one channel status register indicates a  bus error (illegal memory access).
    157157
    158158 === 5) void '''giet_coproc_release'''( unsigned int coproc_reg_index ) ===
    159  This function releases the coprocessor allocated to the calling task, after deactivation.
     159 This function releases the coprocessor allocated to the calling thread, after deactivation.
    160160 * '''coproc_reg_index''' : coprocessor configuration register index to be written for coprocessor deactivation.
    161161
     
    163163 ==  __TTY related system calls__ ==
    164164
    165 The GIET_VM allows an user task to use a private TTY terminal, or to display log message on the kernel TTY0 terminal.
     165The GIET_VM allows an user thread to use a private TTY terminal, or to display log message on the kernel TTY0 terminal.
    166166
    167167 === 1) void '''giet_tty_alloc'''( unsigned int shared ) ===
    168 If the '''shared''' argument has a zero value, this function allocates a private terminal : the TTY terminal index is registered only in the calling task context.
    169 If the '''shared''' argument has a non-zero value, it allocate a shared terminal : the same TTY terminal index is registered in the task context of all tasks that are in the same vspace as the calling task.
    170 The calling task exit if no TTY terminal available.
     168If the '''shared''' argument has a zero value, this function allocates a private terminal : the TTY terminal index is registered only in the calling thread context.
     169If the '''shared''' argument has a non-zero value, it allocate a shared terminal : the same TTY terminal index is registered in the thread context of all threads that are in the same vspace as the calling thread.
     170The calling thread exit if no TTY terminal available.
    171171
    172172WARNING: A shared TTY should be protected by an user-level lock.
    173173
    174174  === 2) void '''giet_tty_printf'''( char* format, ... ) ===
    175 This function print formated text on a private terminal that must have been allocated to the calling task by the ''get_tty_alloc()'' function. Therefore,  it does not take any lock, but checks terminal allocation.
     175This function print formated text on a private terminal that must have been allocated to the calling thread by the ''get_tty_alloc()'' function. Therefore,  it does not take any lock, but checks terminal allocation.
    176176Only a limited number of formats are supported:
    177177   * %d : signed decimal
     
    181181   * %c : char
    182182   * %s : string
    183 Task exit if  private terminal index not defined, or in case of illegal format.
     183thread exit if  private terminal index not defined, or in case of illegal format.
    184184
    185185 === 3) void '''giet_tty_getc'''( char* byte ) ===
    186 This blocking function fetches a single character from the private terminal that must have been allocated to the calling task in the application mapping. It uses the TTY_RX_IRQ interrupt, and the associated kernel buffer. Task exit if private TTY index not defined.
     186This blocking function fetches a single character from the private terminal that must have been previously allocated to the calling thread. It uses the TTY_RX_IRQ interrupt, and the associated kernel buffer. The thread exit if a threadprivate TTY index not defined.
    187187
    188188 === 4) void '''giet_tty_getw'''( unsigned int* val ) ===
    189 This blocking function fetches a string of decimal characters (most significant digit first) to build a 32-bits unsigned integer from the private TTY terminal  that must have been allocated to the calling task in the application mapping. It uses the TTY_RX_IRQ interrupt, and the associated kernel buffer.
     189This blocking function fetches a string of decimal characters (most significant digit first) to build a 32-bits unsigned integer from the private TTY terminal  that must have been allocated to the calling thread. It uses the TTY_RX_IRQ interrupt, and the associated kernel buffer.
    190190The 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  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.
    191 Task exit if private TTY index not defined.
     191The thread threadexit if private TTY index not defined.
    192192
    193193 === 5) void '''giet_tty_gets'''( char* buf, unsigned int bufsize ) ===
    194 This blocking function fetches a string from the private terminal that must have been allocated to the calling task in the application mapping. It writes the string to a fixed length buffer.
     194This blocking function fetches a string from the private terminal that must have been allocated to the calling threadthread. It writes the string to a fixed length buffer.
    195195It uses the TTY_RX_IRQ interrupt, and the associated kernel buffer.
    196196Up 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.
    197 Task exit if private TTY index not defined.
     197The thread exit if a private TTY index is threadnot defined.
    198198
    199199 ==  __Timer related system calls__ ==
    200200
    201 The GIET_VM allows an user task to activate a private timer channel, generating periodical IRQs. This timer is allocated in the external multi-timers peripheral.
     201The GIET_VM allows an user thread to activate a private timer channel, generating periodical IRQs. This timer is allocated in the external multi-timers peripheral.
    202202
    203203 === 1) void '''giet_timer_alloc'''()
    204 This function allocates a private user timer  to the calling task, and registers the channel index in the task context.
    205 Task exit if no timer channel available
     204This function allocates a private user timer  to the calling thread, and registers the channel index in the thread context.
     205The thread exit if no timer channel is threadavailable
    206206
    207207 === 2) void '''giet_timer_start'''( unsigned int period )
    208 This function starts the private timer allocated to the calling task.
    209 Task exit if no channel allocated.
     208This function starts the private timer allocated to the calling thread.
     209The thread exit if no channel is allocated to the calling thread.
    210210
    211211 === 3) void '''giet_timer_stop'''( ) ===
    212 This function stops the private timer allocated to the calling task.
    213 Task exit if no channel allocated.
     212This function stops the private timer allocated to the calling thread.
     213The thread exit if no channel is allocated to the calling thread.thread
    214214
    215215 ==  __File system related system calls__ ==
     
    218218 * The Inode-Tree (distributed on all clusters) is the internal representation of the File System tree.
    219219 * The Fat-Cache (distributed on all clusters) is used to cache the FAT region of the block device.
    220  * The Fat-Cache (distributed on all clusters / one cache per open file) is used to cache the DATA region of the block device.
     220 * The File-Cache (distributed on all clusters / one cache per open file) is used to cache the DATA region of the block device.
    221221 * The File-Descriptor-Array (in cluster[0,0]) contains the open files descriptors.
    222222 * The Fat-Descriptor (in cluster[0,0] contains the FAT32 general information.
    223223
     224The error code map (negative values) is defined in the  [source:soft/giet_vm/giet_fat32/fat32_shared.h fat32_shared.h] file.
     225 
    224226=== 1) int '''giet_fat_open'''( char* pathname, unsigned int flags ) ===
    225 This function allocates a file descriptor to the calling task, for the file identified by its absolute '''pathname''' (from root).
    226 If several tasks try to open the same file, each task obtains a private file descriptor.
    227 The semantic is similar to the UNIX open() function, but the UNIX oflags and the UNIX access rights are not supported.
    228 The two following flags are supported, and can be ''ored'' in the '''flags''' argument:
     227This function allocates a file descriptor to the calling thread, for the file identified by its absolute ‘’<pathname>.
     228If several threads try to open the same file, each thread obtains a private file descriptor.
     229The semantic is similar to the UNIX open() function, but the UNIX access rights are not supported.
     230The two following flags are supported, and can be ''ored'' to define the <flags> argument:
    229231 * O_RDONLY (0x01) : file accessed as read-only. Default is read/write.
    230232 * O_CREATE  (0x20) : file created if it does not exist on disk. Default is no creation.
    231 If one of the directories specified in the pathd does not exist, an error is returned.
    232 
    233 WARNING: A single node name (file or directory) cannot be larger than 33 characters.
    234 
    235 Returns file descriptor index if success / Returns a negative value if error:
    236  *   -1 :  "fat not initialised"
    237  *   -2 :  "path to parent not found"
    238  *   -3 :  "name in path too long"
    239  *   -4 :  "file not found"
    240  *   -5 :  "no more free cluster"
    241  *   -6 :  "cannot update FAT on block device"
    242  *   -7 :  "cannot update FS-INFO on block device"
    243  *   -8 :  "file descriptor array full"
    244  
     233If one of the directories specified in the paththread does not exist, an error is returned.
     234
     235WARNING : A single node name (file or directory) cannot be larger than 33 characters.
     236
     237Returns file descriptor index if success.
     238Returns a negative value if error.
     239
    245240
    246241=== 2)  int '''giet_fat_close'''( unsigned int fd_id ) ===
     
    250245
    251246Returns 0 if success.
    252 Returns -1 if error.
     247Returns a negative value if error.
    253248
    254249=== 3) int '''get_fat_file_info'''( unsigned int fd_id , unsigned int* size , unsigned int* offset ) ===
     
    256251
    257252Returns 0 if success.
    258 Returns -1 if error.
     253Returns a negative value if error.
    259254
    260255=== 4) int '''giet_fat_read'''( unsigned int fd_id , void* buffer , unsigned int count ) ===
     
    272267
    273268Returns number of bytes actually transferred if success.
    274 Returns -1 if error.
     269Returns a negative value if error.
    275270
    276271=== 6) int '''giet_fat_lseek'''( unsigned int fd_id , unsigned int offset , unsigned int whence ) ===
     
    282277
    283278Returns new offset value (bytes) if success.
    284 Returns -1 if error.
    285 
    286 === 7) int '''giet_fat_rm'''( char* pathname ) ===
     279Returns a negative value if error.
     280
     281=== 7) int '''giet_fat_remove'''( char* pathname , unsigned int should_be_dir ) ===
    287282This function has the same semantic as the UNIX unlink() function.
    288283It deletes a file identified by the absolute "pathname" argument from the sile system.
    289 AN error is reported if the references count (number of open file descriptor) is not zero.
     284An error is reported if the references count (number of open file descriptor) is not zero.
    290285All clusters allocated to this file in the block device DATA region are released.
    291286The Inode-Tree is updated.
     
    294289
    295290Returns 0 if success.
    296 Returns -1 if error.
    297 
    298 === 8) int '''get_fat_mkdir'''( char* pathname ) ===
     291Returns a negative value if error.
     292
     293=== 8) int '''get_fat_rename'''( char* old_path , char* new_path )===
     294This function has the same semantic as the UNIX rename() function.
     295It  causes the node identified by <old_path> to be renamed as <new_path>.  If <new_path>  exists, it is first removed.
     296Both <old_path> and <new_path> must be of the same type (either directories or non directories).
     297
     298Returns 0 if success.
     299Returns a negative value if error.
     300
     301=== 9) int '''giet_fat_mkdir'''( char* pathname ) ===
    299302This function has the same semantic as the UNIX mkdir() function.
    300303It creates in the file system the directory specified by the absolute "pathname" argument. 
     
    306309
    307310Returns 0 if success.
    308 Returns -1 if error.
    309 
    310 === 9) int '''get_fat_rmdir'''( char* pathname ) ===
    311 This function has the same semantic as the UNIX mkdir() function.
    312 It deletes the directory specified by the absolute "pathname" argument from the file system.
    313 The Fat-Cache is updated, and the FAT region on block device is updated.
    314 The Inode-Tree is updated.
    315 The memory allocated to the File-Cache is released.
    316 
    317 Returns 0 if success.
    318 Returns -1 if error.
     311Returns a negative value if error.
     312
     313=== 10) int '''giet_fat_opendir'''( char* pathname ) ===
     314This function allocates a file descriptor to the calling thread, for the directory identified by its absolute <pathname>.
     315
     316Returns the file descriptor associated to the diredtory if success.
     317Returns a negative value if error.
     318
     319=== 11) int '''giet_fat_closedir'''( unsigned int fd_id ) ===
     320Close a directory identified by the <fd_id> file descriptor.
     321It decrements the reference count in the inode associated to the directory,
     322and release the fd_id entry in the file descriptors array.
     323
     324Returns 0 if success.
     325Returns a negative value if error.
     326
     327=== 12) int '''giet_fat_readdir'''( unsigned int fd_id , fat_dirent_t* entry ) ===
     328This function access one directory entry identified by the  <fd_id> argument (obtained by the
     329giet_fat_opendir() function), and writes the relevant informations to the <entry> argument.
     330This includes the cluster, size, is_dir, and name.
     331
     332Returns 0 if success.
     333Returns a negative value if error.
     334
    319335
    320336 == __Network related system call__ ==
    321337
    322 The GIET_VM allows a user task to get and use a private NIC channel, using the CMA component (chained buffers DMA) to transfer packets to or an user buffer.
    323 The NIC channel and the CMA channel are registered in the task context.
     338The GIET_VM allows a user thread to get and use a private NIC channel, using the CMA component (chained buffers DMA) to transfer packets to or an user buffer.
     339The NIC channel and the CMA channel are registered in the thread context.
    324340
    325341 === 1) unsigned int '''giet_nic_tx_alloc'''( unsigned int xmax,  unsigned int ymax) ===
    326 This function allocates a private NIC_TX channel (coming with the associated kernel NIC_TX chbuf), and a private CMA channel  to the calling task. It registers both indexes in the calling task context, and returns the NIC channel index. This channel can be shared by severals tasks of a parallel multi-tasks application.
     342This function allocates a private NIC_TX channel (coming with the associated kernel NIC_TX chbuf), and a private CMA channel  to the calling thread. It registers both indexes in the calling thread context, and returns the NIC channel index. This channel can be shared by severals threads of a parallel multi-threads application.
    327343The packets are transfered by the hardware to the NIC from a distributed kernel chbuf (one 4 Kbytes container per cluster), where the number of involved clusters is defined by the (xmax / ymax) parameters. The (xmax / ymax) arguments cannot be larger than (X_SIZE / Y_SIZE) defining the max number of clusters in the platform, but they can be smaller.
    328 The calling task exit if no available NIC_TX channel,  if no available CMA channel, if (xmax / ymax) are too large, or if there is not enough memory for the distributed kernel containers in one selected cluster.
     344The calling thread exit if no available NIC_TX channel,  if no available CMA channel, if (xmax / ymax) are too large, or if there is not enough memory for the distributed kernel containers in one selected cluster.
    329345
    330346 === 2) unsigned int '''giet_nic_rx_alloc'''( unsigned int xmax,  unsigned int ymax ) ===
    331 This function allocates a private NIC_RX channel (coming with the associated kernel NIC_RX chbuf), and a private CMA channel  to the calling task. It registers both indexes in the calling task context, and returns the NIC channel index. This channel can be shared by severals tasks of a parallel multi-tasks application.
     347This function allocates a private NIC_RX channel (coming with the associated kernel NIC_RX chbuf), and a private CMA channel  to the calling thread. It registers both indexes in the calling thread context, and returns the NIC channel index. This channel can be shared by severals threads of a parallel multi-threads application.
    332348The packets are transfered by the hardware from the NIC to a distributed kernel chbuf (one 4 Kbytes container per cluster), where the number of involved clusters is defined by the (xmax / ymax) parameters. The (xmax / ymax) arguments cannot be larger than (X_SIZE / Y_SIZE) defining the max number of clusters in the platform, but they can be smaller.
    333 The calling task exit if no available NIC_TX channel,  if no available CMA channel, if (xmax / ymax) are too large, or if there is not enough memory for the distributed kernel containers in one selected cluster.
     349The calling thread exit if no available NIC_TX channel,  if no available CMA channel, if (xmax / ymax) are too large, or if there is not enough memory for the distributed kernel containers in one selected cluster.
    334350
    335351 === 3) void '''giet_nic_tx_start'''( unsigned int channel ) ===
    336 This function activates both the NIC_TX channel, and the CMA channel allocated to the calling task to transfer packets from the distributed kernel chbuf to the NIC.
    337 The calling task exit if no allocated NIC_TX channel or no allocated CMA channel, or if the NIC channel argument does not fit the channel allocated to the calling task.
     352This function activates both the NIC_TX channel, and the CMA channel allocated to the calling thread to transfer packets from the distributed kernel chbuf to the NIC.
     353The calling thread exit if no allocated NIC_TX channel or no allocated CMA channel, or if the NIC channel argument does not fit the channel allocated to the calling thread.
    338354
    339355 === 4) void '''giet_nic_rx_start'''( unsigned int channel ) ===
    340 This function activates both the NIC_RX channel, and the CMA channel allocated to the calling task to transfer packets from the NIC to the distributed kernel chbuf.
    341 The calling task exit if no allocated NIC_RX channel or no allocated CMA channel.
     356This function activates both the NIC_RX channel, and the CMA channel allocated to the calling thread to transfer packets from the NIC to the distributed kernel chbuf.
     357The calling thread exit if no allocated NIC_RX channel or no allocated CMA channel.
    342358
    343359 === 5) void '''giet_nic_tx_move'''( unsigned int nic_channel,  void* buffer ) ===
     
    345361 * '''nic_channel''' define the NIC channel index.
    346362 * '''buffer''' is the container base address in user space.
    347 Several user tasks can concurrently access the same chbuf, because the syscall handler takes the lock protecting the chbuf.
     363Several user threads can concurrently access the same chbuf, because the syscall handler takes the lock protecting the chbuf.
    348364It returns only when the container has been fully transfered.
    349 The calling task exit if the buffer is not in user space, or if the NIC channel is too large, or in case of timeout.
     365The calling thread exit if the buffer is not in user space, or if the NIC channel is too large, or in case of timeout.
    350366
    351367 === 6) void '''giet_nic_rx_move'''( unsigned int nic_channel,  void* buffer ) ===
     
    353369 * '''nic_channel''' define the NIC channel index.
    354370 * '''buffer'''  is the container base address in user space.
    355 Several user tasks can concurrently access the same chbuf, because the syscall handler takes the lock protecting the chbuf.
     371Several user threads can concurrently access the same chbuf, because the syscall handler takes the lock protecting the chbuf.
    356372It returns only when the container has been fully transfered.
    357 The calling task exit if the buffer is not in user space, or if the NIC channel is too large, or in case of timeout.
     373The calling thread exit if the buffer is not in user space, or if the NIC channel is too large, or in case of timeout.
    358374
    359375 === 7) void '''giet_nic_tx_stop( unsigned int channel ) ===
    360 This function desactivates both the NIC_TX channel and the CMA channel allocated to the calling task.
    361 The calling task exit if no allocated NIC_TX channel or no allocated CMA channel.
     376This function desactivates both the NIC_TX channel and the CMA channel allocated to the calling thread.
     377The calling thread exit if no allocated NIC_TX channel or no allocated CMA channel.
    362378
    363379 === 8) void '''giet_nic_rx_stop( unsigned int channel ) ===
    364 This function desactivates both the NIC_RX channel and the CMA channel allocated to the calling task.
    365 The calling task exit if no allocated NIC_RX channel or no allocated CMA channel.
     380This function desactivates both the NIC_RX channel and the CMA channel allocated to the calling thread.
     381The calling thread exit if no allocated NIC_RX channel or no allocated CMA channel.
    366382
    367383 === 9) void '''giet_nic_rx_clear'''( unsigned int channel ) ===
     
    380396 == __Frame Buffer related system calls__ ==
    381397
    382 To display images, an user task can access the frame buffer through a memcpy() or through the ''Chained Buffer DMA'' controller (called CMA).
    383 The four first functions use a private CMA channel that is registered in the task context. The Two last functions use a memcpy().
     398To display images, an user thread can access the frame buffer through a memcpy() or through the ''Chained Buffer DMA'' controller (called CMA).
     399The four first functions use a private CMA channel that is registered in the thread context. The Two last functions use a memcpy().
    384400
    385401 === 1) void '''giet_fbf_cma_alloc'''()
    386 This function allocates a private CMA channel  to the calling task, and registers the channel index
    387 in the task context.
    388 Task exit if no CMA channel available
     402This function allocates a private CMA channel  to the calling thread, and registers the channel index
     403in the thread context.
     404The threadthread exit if no CMA channel available
    389405
    390406 === 2) void '''giet_fbf_cma_init_buf'''( void* buf0_vbase , void* buf1_vbase , void* sts0_vaddr , void* sts1_vaddr ) ===
     
    406422
    407423 === 5) void '''giet_fbf_cma_stop'''( ) ===
    408 This function desactivates the CMA channel allocated to the calling task.
     424This function desactivates the CMA channel allocated to the calling thread.
    409425
    410426 === 6) void '''giet_fbf_sync_read'''( unsigned int offset , void* buffer , unsigned int length ) ===
     
    424440
    425441 === 1) void '''giet_procs_number'''( unsigned int* x_size , unsigned int* y_size , unsigned int* nprocs ) ===
    426 This function returns the actual number of processors in a clusterized 2D mesh architecture.
    427  * '''x_size''' number of clusters containing processors in a row.
    428  * '''y_size''' number of clusters containing processors in a column.
    429  * '''nprocs''' number of processors per cluster.
     442This function returns the actual number of processors in a clusterized 2D mesh architecture. The <x_size> argument is the number of clusters containing processors in a row. The <y_size> argument is the number of clusters containing processors in a column. The <nprocs> argument is the number of processors per cluster.
    430443
    431444 === 2) void '''giet_vseg_get_vbase'''( char* vspace_name, char*  vseg_name, unsigned int* vbase) ===
    432 This function returns in argument ''vbase'' the virtual base address of a vseg defined in the mapping_info data structure. The vseg is identified by the two arguments ''vspace_name'' and ''vseg_name''. In case of error (such as undefined vspace or undefined vseg), it makes a giet_exit().
     445This function returns in the <vbase> argument the virtual base address of a vseg defined in the mapping_info data structure. The vseg is identified by the <vspace_name> and <vseg_name> arguments. In case of error (such as undefined vspace or undefined vseg), the calling thread exit.
    433446
    434447 === 3) void '''giet_vseg_get_length'''( char* vspace_name, char*  vseg_name, unsigned int* length) ===
    435 This function returns in argument ''length'' the length (bytes) of a vseg defined in the mapping_info data structure. The vseg is identified by the two arguments ''vspace_name'' and ''vseg_name''. In case of error (such as undefined vspace or undefined vseg), it makes a giet_exit().
     448This function returns in the <length> argument the length (bytes) of a vseg defined in the mapping_info data structure.
     449The vseg is identified by the <vspace_name> and <vseg_name>. In case of error (such as undefined vspace or undefined vseg), the calling thread exit.
    436450
    437451 === 4) void '''giet_heap_info'''( unsigned int* vaddr, unsigned int* length, unsigned int  x, unsigned int  y );
    438 This function returns in the <vaddr> and <length> arguments the characteristics of the user heap located in cluster[x,y] and defined in the space running the calling task.In case of error (such as undefined heap segment in the selected cluster, or illegal cluster coordinates) it returns <vaddr> = <length> = 0.
     452This function returns in the <vaddr> and <length> arguments the characteristics of the user heap located in cluster[x,y] and defined in the space running the calling thread. In case of error (such as undefined heap segment in the selected cluster, or illegal cluster coordinates) it returns <vaddr> = <length> = 0.
    439453
    440454 === 5) void '''giet_get_xy'''( void* ptr, unsigned int* px, unsigned int* py ) ===
    441 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(). 
     455This function returns through the <px> and <py> arguments the coordinates of the cluster containing the physical address associated to the <ptr> argument containing a virtual address. In case of error (unmapped virtual address), the calling thread exit. 
     456
     457
     458