= GIET-VM / Task context access functions = [[PageOutline]] The [source:soft/giet_vm/giet_common/utils.c utils.c] and [source:soft/giet_vm/giet_common/utils.h utils.h] files define the functions used to access the task contexts. The codes used to identify the various context slots are defined [source:soft/giet_vm/giet_kernel/ctx_handler.h here]. These functions are prefixed by "_" to remind that they can only be executed by a processor in kernel mode. === unsigned int '''_get_current_task_id'''( void ) === This function returns the local index of the currently running task. === unsigned int '''_get_task_slot'''( unsigned int x, unsigned int y, unsigned int p, unsigned int ltid, unsigned int slot ) === This function returns the content of a context slot for any task running on any processor. * '''x''' : cluster x coordinate * '''y''' : cluster y coordinate * '''p''' : processor local index * '''ltid''' : task local index * '''slot''' : slot index === void '''_set_task_slot'''( unsigned int x, unsigned int y, unsigned int p, unsigned int ltid, unsigned int slot, unsigned int value ) === This function updates the content of a context slot for any task running on any processor. * '''x''' : cluster x coordinate * '''y''' : cluster y coordinate * '''p''' : processor local index * '''ltid''' : task local index * '''slot''' : slot index === unsigned int '''_get_context_slot'''( unsigned int slot ) === This function returns the content of a context slot for the calling task. === void '''_set_context_slot'''( unsigned int slot, unsigned int value ) === This function updates the content of a context slot for the calling task.