Changes between Version 110 and Version 111 of library_stdio
- Timestamp:
- Sep 15, 2015, 6:15:58 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
library_stdio
v110 v111 31 31 == __Thread related system calls__ == 32 32 33 The following system calls implement the POSIX Threads. The ''pthread_t'' and ''pthread_attr_t'' types34 are defined in the [source:soft/giet_vm/giet_libs/stdio.h stdio.h] file.33 The GIET-VM support a subset of the POSIX Threads. 34 The ''pthread_t'' and ''pthread_attr_t'' types are defined in the [source:soft/giet_vm/giet_libs/stdio.h stdio.h] file. 35 35 36 36 === 1) int '''giet_pthread_create'''( pthread_t* buffer , pthread_attr_t* attr , void* function , void* arg ) === … … 105 105 * 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. 106 106 * 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 t askis 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. 108 108 - 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. 109 109 … … 126 126 127 127 === 1) void '''giet_coproc_alloc'''( unsigned int coproc_type , unsigned int* coproc_info ) === 128 This function allocates a private coprocessor to the calling t ask, taking a lock to grant exclusive ownership, and register the coprocessor coordinates in the taskcontext.129 In the current implementation, the t ask exit if there is no coprocessor of requested type in the same cluster as the calling task.128 This 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. 129 In the current implementation, the thread exit if there is no coprocessor of requested type in the same cluster as the calling thread. 130 130 In case of success, it returns the coprocessor characteristics in the '''coproc_info''' variable. 131 131 * '''coproc_type''' : see supported types above. … … 152 152 153 153 === 4) void '''giet_coproc_completed'''( ) === 154 This blocking function can be used to synchronize a software t askwith an hardware coprocessor running in DMA_NO_IRQ mode.154 This blocking function can be used to synchronize a software thread with an hardware coprocessor running in DMA_NO_IRQ mode. 155 155 It polls the status register of all communication channels, and returns only when all transfers are completed. 156 156 This function exit when at least one channel status register indicates a bus error (illegal memory access). 157 157 158 158 === 5) void '''giet_coproc_release'''( unsigned int coproc_reg_index ) === 159 This function releases the coprocessor allocated to the calling t ask, after deactivation.159 This function releases the coprocessor allocated to the calling thread, after deactivation. 160 160 * '''coproc_reg_index''' : coprocessor configuration register index to be written for coprocessor deactivation. 161 161 … … 163 163 == __TTY related system calls__ == 164 164 165 The GIET_VM allows an user t askto use a private TTY terminal, or to display log message on the kernel TTY0 terminal.165 The GIET_VM allows an user thread to use a private TTY terminal, or to display log message on the kernel TTY0 terminal. 166 166 167 167 === 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 t askcontext.169 If the '''shared''' argument has a non-zero value, it allocate a shared terminal : the same TTY terminal index is registered in the t ask context of all tasks that are in the same vspace as the calling task.170 The calling t askexit if no TTY terminal available.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 thread 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 thread context of all threads that are in the same vspace as the calling thread. 170 The calling thread exit if no TTY terminal available. 171 171 172 172 WARNING: A shared TTY should be protected by an user-level lock. 173 173 174 174 === 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 t askby the ''get_tty_alloc()'' function. Therefore, it does not take any lock, but checks terminal allocation.175 This 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. 176 176 Only a limited number of formats are supported: 177 177 * %d : signed decimal … … 181 181 * %c : char 182 182 * %s : string 183 Taskexit if private terminal index not defined, or in case of illegal format.183 thread exit if private terminal index not defined, or in case of illegal format. 184 184 185 185 === 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 ifprivate TTY index not defined.186 This 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. 187 187 188 188 === 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 t ask in the application mapping. It uses the TTY_RX_IRQ interrupt, and the associated kernel buffer.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 thread. It uses the TTY_RX_IRQ interrupt, and the associated kernel buffer. 190 190 The 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 T askexit if private TTY index not defined.191 The thread threadexit if private TTY index not defined. 192 192 193 193 === 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 t ask in the application mapping. It writes the string to a fixed length buffer.194 This 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. 195 195 It uses the TTY_RX_IRQ interrupt, and the associated kernel buffer. 196 196 Up 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 T ask exit if private TTY indexnot defined.197 The thread exit if a private TTY index is threadnot defined. 198 198 199 199 == __Timer related system calls__ == 200 200 201 The GIET_VM allows an user t askto activate a private timer channel, generating periodical IRQs. This timer is allocated in the external multi-timers peripheral.201 The 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. 202 202 203 203 === 1) void '''giet_timer_alloc'''() 204 This function allocates a private user timer to the calling t ask, and registers the channel index in the taskcontext.205 T ask exit if no timer channelavailable204 This function allocates a private user timer to the calling thread, and registers the channel index in the thread context. 205 The thread exit if no timer channel is threadavailable 206 206 207 207 === 2) void '''giet_timer_start'''( unsigned int period ) 208 This function starts the private timer allocated to the calling t ask.209 T ask exit if no channel allocated.208 This function starts the private timer allocated to the calling thread. 209 The thread exit if no channel is allocated to the calling thread. 210 210 211 211 === 3) void '''giet_timer_stop'''( ) === 212 This function stops the private timer allocated to the calling t ask.213 T ask exit if no channel allocated.212 This function stops the private timer allocated to the calling thread. 213 The thread exit if no channel is allocated to the calling thread.thread 214 214 215 215 == __File system related system calls__ == … … 218 218 * The Inode-Tree (distributed on all clusters) is the internal representation of the File System tree. 219 219 * The Fat-Cache (distributed on all clusters) is used to cache the FAT region of the block device. 220 * The F at-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. 221 221 * The File-Descriptor-Array (in cluster[0,0]) contains the open files descriptors. 222 222 * The Fat-Descriptor (in cluster[0,0] contains the FAT32 general information. 223 223 224 The error code map (negative values) is defined in the [source:soft/giet_vm/giet_fat32/fat32_shared.h fat32_shared.h] file. 225 224 226 === 1) int '''giet_fat_open'''( char* pathname, unsigned int flags ) === 225 This function allocates a file descriptor to the calling t ask, for the file identified by its absolute '''pathname''' (from root).226 If several t asks try to open the same file, each taskobtains a private file descriptor.227 The semantic is similar to the UNIX open() function, but the UNIX oflags and the UNIXaccess rights are not supported.228 The two following flags are supported, and can be ''ored'' in the '''flags'''argument:227 This function allocates a file descriptor to the calling thread, for the file identified by its absolute ‘’<pathname>. 228 If several threads try to open the same file, each thread obtains a private file descriptor. 229 The semantic is similar to the UNIX open() function, but the UNIX access rights are not supported. 230 The two following flags are supported, and can be ''ored'' to define the <flags> argument: 229 231 * O_RDONLY (0x01) : file accessed as read-only. Default is read/write. 230 232 * 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 233 If one of the directories specified in the paththread does not exist, an error is returned. 234 235 WARNING : A single node name (file or directory) cannot be larger than 33 characters. 236 237 Returns file descriptor index if success. 238 Returns a negative value if error. 239 245 240 246 241 === 2) int '''giet_fat_close'''( unsigned int fd_id ) === … … 250 245 251 246 Returns 0 if success. 252 Returns -1if error.247 Returns a negative value if error. 253 248 254 249 === 3) int '''get_fat_file_info'''( unsigned int fd_id , unsigned int* size , unsigned int* offset ) === … … 256 251 257 252 Returns 0 if success. 258 Returns -1if error.253 Returns a negative value if error. 259 254 260 255 === 4) int '''giet_fat_read'''( unsigned int fd_id , void* buffer , unsigned int count ) === … … 272 267 273 268 Returns number of bytes actually transferred if success. 274 Returns -1if error.269 Returns a negative value if error. 275 270 276 271 === 6) int '''giet_fat_lseek'''( unsigned int fd_id , unsigned int offset , unsigned int whence ) === … … 282 277 283 278 Returns new offset value (bytes) if success. 284 Returns -1if error.285 286 === 7) int '''giet_fat_r m'''( char* pathname) ===279 Returns a negative value if error. 280 281 === 7) int '''giet_fat_remove'''( char* pathname , unsigned int should_be_dir ) === 287 282 This function has the same semantic as the UNIX unlink() function. 288 283 It deletes a file identified by the absolute "pathname" argument from the sile system. 289 A Nerror is reported if the references count (number of open file descriptor) is not zero.284 An error is reported if the references count (number of open file descriptor) is not zero. 290 285 All clusters allocated to this file in the block device DATA region are released. 291 286 The Inode-Tree is updated. … … 294 289 295 290 Returns 0 if success. 296 Returns -1 if error. 297 298 === 8) int '''get_fat_mkdir'''( char* pathname ) === 291 Returns a negative value if error. 292 293 === 8) int '''get_fat_rename'''( char* old_path , char* new_path )=== 294 This function has the same semantic as the UNIX rename() function. 295 It causes the node identified by <old_path> to be renamed as <new_path>. If <new_path> exists, it is first removed. 296 Both <old_path> and <new_path> must be of the same type (either directories or non directories). 297 298 Returns 0 if success. 299 Returns a negative value if error. 300 301 === 9) int '''giet_fat_mkdir'''( char* pathname ) === 299 302 This function has the same semantic as the UNIX mkdir() function. 300 303 It creates in the file system the directory specified by the absolute "pathname" argument. … … 306 309 307 310 Returns 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. 311 Returns a negative value if error. 312 313 === 10) int '''giet_fat_opendir'''( char* pathname ) === 314 This function allocates a file descriptor to the calling thread, for the directory identified by its absolute <pathname>. 315 316 Returns the file descriptor associated to the diredtory if success. 317 Returns a negative value if error. 318 319 === 11) int '''giet_fat_closedir'''( unsigned int fd_id ) === 320 Close a directory identified by the <fd_id> file descriptor. 321 It decrements the reference count in the inode associated to the directory, 322 and release the fd_id entry in the file descriptors array. 323 324 Returns 0 if success. 325 Returns a negative value if error. 326 327 === 12) int '''giet_fat_readdir'''( unsigned int fd_id , fat_dirent_t* entry ) === 328 This function access one directory entry identified by the <fd_id> argument (obtained by the 329 giet_fat_opendir() function), and writes the relevant informations to the <entry> argument. 330 This includes the cluster, size, is_dir, and name. 331 332 Returns 0 if success. 333 Returns a negative value if error. 334 319 335 320 336 == __Network related system call__ == 321 337 322 The GIET_VM allows a user t askto 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 t askcontext.338 The 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. 339 The NIC channel and the CMA channel are registered in the thread context. 324 340 325 341 === 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 t ask. 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.342 This 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. 327 343 The 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 t askexit 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.344 The 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. 329 345 330 346 === 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 t ask. 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.347 This 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. 332 348 The 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 t askexit 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.349 The 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. 334 350 335 351 === 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 t askto transfer packets from the distributed kernel chbuf to the NIC.337 The calling t ask 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.352 This 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. 353 The 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. 338 354 339 355 === 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 t askto transfer packets from the NIC to the distributed kernel chbuf.341 The calling t askexit if no allocated NIC_RX channel or no allocated CMA channel.356 This 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. 357 The calling thread exit if no allocated NIC_RX channel or no allocated CMA channel. 342 358 343 359 === 5) void '''giet_nic_tx_move'''( unsigned int nic_channel, void* buffer ) === … … 345 361 * '''nic_channel''' define the NIC channel index. 346 362 * '''buffer''' is the container base address in user space. 347 Several user t asks can concurrently access the same chbuf, because the syscall handler takes the lock protecting the chbuf.363 Several user threads can concurrently access the same chbuf, because the syscall handler takes the lock protecting the chbuf. 348 364 It returns only when the container has been fully transfered. 349 The calling t askexit if the buffer is not in user space, or if the NIC channel is too large, or in case of timeout.365 The calling thread exit if the buffer is not in user space, or if the NIC channel is too large, or in case of timeout. 350 366 351 367 === 6) void '''giet_nic_rx_move'''( unsigned int nic_channel, void* buffer ) === … … 353 369 * '''nic_channel''' define the NIC channel index. 354 370 * '''buffer''' is the container base address in user space. 355 Several user t asks can concurrently access the same chbuf, because the syscall handler takes the lock protecting the chbuf.371 Several user threads can concurrently access the same chbuf, because the syscall handler takes the lock protecting the chbuf. 356 372 It returns only when the container has been fully transfered. 357 The calling t askexit if the buffer is not in user space, or if the NIC channel is too large, or in case of timeout.373 The calling thread exit if the buffer is not in user space, or if the NIC channel is too large, or in case of timeout. 358 374 359 375 === 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 t ask.361 The calling t askexit if no allocated NIC_TX channel or no allocated CMA channel.376 This function desactivates both the NIC_TX channel and the CMA channel allocated to the calling thread. 377 The calling thread exit if no allocated NIC_TX channel or no allocated CMA channel. 362 378 363 379 === 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 t ask.365 The calling t askexit if no allocated NIC_RX channel or no allocated CMA channel.380 This function desactivates both the NIC_RX channel and the CMA channel allocated to the calling thread. 381 The calling thread exit if no allocated NIC_RX channel or no allocated CMA channel. 366 382 367 383 === 9) void '''giet_nic_rx_clear'''( unsigned int channel ) === … … 380 396 == __Frame Buffer related system calls__ == 381 397 382 To display images, an user t askcan 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 t askcontext. The Two last functions use a memcpy().398 To display images, an user thread can access the frame buffer through a memcpy() or through the ''Chained Buffer DMA'' controller (called CMA). 399 The four first functions use a private CMA channel that is registered in the thread context. The Two last functions use a memcpy(). 384 400 385 401 === 1) void '''giet_fbf_cma_alloc'''() 386 This function allocates a private CMA channel to the calling t ask, and registers the channel index387 in the t askcontext.388 T askexit if no CMA channel available402 This function allocates a private CMA channel to the calling thread, and registers the channel index 403 in the thread context. 404 The threadthread exit if no CMA channel available 389 405 390 406 === 2) void '''giet_fbf_cma_init_buf'''( void* buf0_vbase , void* buf1_vbase , void* sts0_vaddr , void* sts1_vaddr ) === … … 406 422 407 423 === 5) void '''giet_fbf_cma_stop'''( ) === 408 This function desactivates the CMA channel allocated to the calling t ask.424 This function desactivates the CMA channel allocated to the calling thread. 409 425 410 426 === 6) void '''giet_fbf_sync_read'''( unsigned int offset , void* buffer , unsigned int length ) === … … 424 440 425 441 === 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. 442 This 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. 430 443 431 444 === 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().445 This 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. 433 446 434 447 === 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(). 448 This function returns in the <length> argument the length (bytes) of a vseg defined in the mapping_info data structure. 449 The 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. 436 450 437 451 === 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 t ask.In case of error (such as undefined heap segment in the selected cluster, or illegal cluster coordinates) it returns <vaddr> = <length> = 0.452 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 thread. In case of error (such as undefined heap segment in the selected cluster, or illegal cluster coordinates) it returns <vaddr> = <length> = 0. 439 453 440 454 === 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(). 455 This 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