Version 7 (modified by 10 years ago) (diff) | ,
---|
GIET-VM / Task context access functions
The utils.c and utils.h files define the functions used to access the task contexts. The codes used to identify the various context slots are defined 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.