Changes between Version 5 and Version 6 of library_stdio


Ignore:
Timestamp:
Aug 6, 2014, 6:56:46 PM (11 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • library_stdio

    v5 v6  
    33[[PageOutline]]
    44
    5 The [source:soft/giet_vm/giet_libs/stdio.c stdio.c] and [source:soft/giet_vm/giet_libs/stdio.h stdio.h] files contains all system calls provided to user applications by the GIET-VM. They are generally prefixed by ''giet_''.
     5The [source:soft/giet_vm/giet_libs/stdio.c stdio.c] and [source:soft/giet_vm/giet_libs/stdio.h stdio.h] files define all system calls provided to user applications by the GIET-VM. They are generally prefixed by ''giet_''.
    66
    77 == __1) Processor related system calls__ ==
    88
    9  * '''int giet_procid()'''
     9 === int giet_procid()===
    1010This function returns the global processor identifier gpid, depending on (X,Y,L) where X,Y are the cluster coordinates, and L is the local processor index.
    1111The format is  gpid = X<<Y_WIDTH + Y) * NB_PROCS_MAX) + L
    1212
    13  * '''int giet_proctime()'''
     13 === int giet_proctime() ===
    1414This function returns the local processor time (number of cycles from reset.
    1515
    16  * '''int giet_rand()'''
     16 === int giet_rand() ===
    1717This function returns a pseudo-random value derived from both the processor
    1818cycle count and the processor index. This value is comprised between 0 & 65535.
     
    5656In case or error, it makes a giet_exit().
    5757
    58  * '''giet_tty_gets( char* buf, unsigned int bufsize )'''
     58 * '''void giet_tty_gets( char* buf, unsigned int bufsize )'''
    5959This 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.
    6060It uses the TTY_RX_IRQ interrupt, and the associated kernel buffer.
     
    7070 == __6) Frame Buffer related system calls__ ==
    7171
     72 == __7) Miscelaneous system calls__ ==
     73
     74 === void giet_exit( char* string ) ===
     75This function stops execution of the calling task with a TTY message explaining the cause. The user task is descheduled and becomes not runable: it does not consume processor cycles anymore.
     76
     77 === void giet_assert( unsigned int condition, char* string ) ===
     78This function uses the giet_exit() system call to kill the calling task if the condition is false.
     79
     80 === void giet_context_switch() ===
     81The user task calling this function is descheduled and the processor is allocated to another task.
     82
     83 === void giet_procnumber( unsigned int cluster_xy, unsigned int buffer ) ===
     84This function returns in the ''buffer'' argument the number of processors in the cluster specified by the ''cluster_xy'' argument. In case or error (illegal cluster index), it makes a giet_exit().
     85
     86 === void giet_vobj_get_vbase( char* vspace_name, char*  vobj_name, unsigned int* vobj_vaddr) ===
     87This function returns 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 of error (undefined vspace or undefined vobj), it makes a giet_exit().
     88
     89 === void giet_heap_info( unsigned int* vaddr, unsigned int* length, unsigned int  x, unsigned int  y );
     90This function supports access to the running task's heap or to a remote heap. If (x < X_SIZE) and (y < Y_SIZE), it returns the base address and length of the heap associated to any task running on cluster(x,y). Otherwise, it returns the base address and length of the heap associated to the calling task.
    7291
    7392
     93
     94
     95
     96