Changes between Version 5 and Version 6 of library_stdio
- Timestamp:
- Aug 6, 2014, 6:56:46 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
library_stdio
v5 v6 3 3 [[PageOutline]] 4 4 5 The [source:soft/giet_vm/giet_libs/stdio.c stdio.c] and [source:soft/giet_vm/giet_libs/stdio.h stdio.h] files containsall system calls provided to user applications by the GIET-VM. They are generally prefixed by ''giet_''.5 The [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_''. 6 6 7 7 == __1) Processor related system calls__ == 8 8 9 * '''int giet_procid()'''9 === int giet_procid()=== 10 10 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. 11 11 The format is gpid = X<<Y_WIDTH + Y) * NB_PROCS_MAX) + L 12 12 13 * '''int giet_proctime()'''13 === int giet_proctime() === 14 14 This function returns the local processor time (number of cycles from reset. 15 15 16 * '''int giet_rand()'''16 === int giet_rand() === 17 17 This function returns a pseudo-random value derived from both the processor 18 18 cycle count and the processor index. This value is comprised between 0 & 65535. … … 56 56 In case or error, it makes a giet_exit(). 57 57 58 * ''' giet_tty_gets( char* buf, unsigned int bufsize )'''58 * '''void giet_tty_gets( char* buf, unsigned int bufsize )''' 59 59 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. 60 60 It uses the TTY_RX_IRQ interrupt, and the associated kernel buffer. … … 70 70 == __6) Frame Buffer related system calls__ == 71 71 72 == __7) Miscelaneous system calls__ == 73 74 === void giet_exit( char* string ) === 75 This 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 ) === 78 This function uses the giet_exit() system call to kill the calling task if the condition is false. 79 80 === void giet_context_switch() === 81 The 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 ) === 84 This 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) === 87 This 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 ); 90 This 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. 72 91 73 92 93 94 95 96