| 1 | | == TO BE DONE == |
| | 1 | = The stdio Library = |
| | 2 | |
| | 3 | 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. |
| | 4 | |
| | 5 | == Processor protected registers == |
| | 6 | |
| | 7 | * '''int giet_procid()''' |
| | 8 | This 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. |
| | 9 | The format is gpid = X<<Y_WIDTH + Y) * NB_PROCS_MAX) + L |
| | 10 | |
| | 11 | * '''int giet_proctime()''' |
| | 12 | This function returns the local processor time (number of cycles from reset. |
| | 13 | |
| | 14 | * '''int giet_rand() |
| | 15 | This function returns a pseudo-random value derived from both the processor |
| | 16 | cycle count and the processor index. This value is comprised between 0 & 65535. |
| | 17 | |
| | 18 | == Informations stored in the running task context == |
| | 19 | |
| | 20 | * int giet_proc_task_id(); |
| | 21 | This functions returns the local task index, identifying the task amongst all task |
| | 22 | running on the same processor. |
| | 23 | |
| | 24 | * '''int giet_global_task_id()''' |
| | 25 | This functions returns the global task id, unique in the system. |
| | 26 | |
| | 27 | * '''int giet_thread_id()''' |
| | 28 | This functions returns the thread index, identiying the task in a given vspace. |
| | 29 | |