wiki:kernel_context

Version 2 (modified by alain, 10 years ago) (diff)

--

GIET-VM / Task context access functions

The utils.c and util.h files define the functions used to access task contexts.

They 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 task index for the task currently running on the processor.

unsigned int _get_task_slot( unsigned int gpid, unsigned int ltid, unsigned int slot )

This function returns the content of a context slot for a task identified by the the gpid argument (global processor index), and the ltid argument (local task index on the processor).

void _set_task_slot( unsigned int gpid, unsigned int ltid, unsigned int slot, unsigned int value )

This function writes value in the the context slot of the task identified by the the gpid argument (global processor index), and the ltid argument (local task index on the processor).

unsigned int _get_context_slot( unsigned int slot )

This function returns the content of a context slot for the calling task.

void _set_task_slot( unsigned int slot, unsigned int value )

This function writes value in the the context slot of the running task.