Ignore:
Timestamp:
Jan 13, 2014, 3:20:29 PM (11 years ago)
Author:
cfuguet
Message:
  • Adding new task context information: THREAD INDEX.

This value can be accessed by USER applications to get the
thread index of the current task. This thread index
corresponds to the index in a vspace.

The value of this index can be forced in the vspace part
of the XML description file using the trdid field in the
task description. When this value is missing, for each
task, a value from 0 to N-1 will be assigned, where N is
the number of task in the vspace.

The user application access this value through the
giet_thread_id() function defined in the stdio library
which uses the SYSCALL_THREAD_ID to access the task
context information.

  • Supporting mono TTY platforms

When the GIET_MONO_TTY constant defined in the giet_config
file, contains a value different than 0, all tasks will
share the TTY[0]. If this is the case, in the stdio
library, the giet_tty_printf() function will take the TTY
hardware lock before writing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_kernel/ctx_handler.c

    r258 r267  
    4141// - LTID   : Task local index (in scheduler)
    4242// - VSID   : Virtual space index
    43 // - RUN    : Task state (0 => sleeping / 1 => runable )
     43// - RUN    : Task state (0 => sleeping / 1 => runnable )
     44// - TRDID  : Thread ID index (in vspace)
    4445//
    4546// ctx[0]<- ***|ctx[8] <- $8 |ctx[16]<- $16|ctx[24]<- $24|ctx[32]<- EPC  |ctx[40]<- TTY
     
    5152// ctx[6]<- $6 |ctx[14]<- $14|ctx[22]<- $22|ctx[30]<- $30|ctx[38]<- VSID |ctx[46]<- GTID
    5253// ctx[7]<- $7 |ctx[15]<- $15|ctx[23]<- $23|ctx[31]<- RA |ctx[39]<- PTPR |ctx[47]<- RUN
     54//
     55// ctx[48]<- TRDID
    5356//////////////////////////////////////////////////////////////////////////////////////////
    5457
     
    164167                : "$3" );
    165168
     169#if GIET_IDLE_TASK_VERBOSITY == 1
    166170        _tty_get_lock( 0 );
    167171        _puts("\n[GIET WARNING] Processor ");
     
    171175        _puts("\n");
    172176        _tty_release_lock( 0 );
     177#endif
    173178
    174179         count = GIET_IDLE_TASK_PERIOD;
Note: See TracChangeset for help on using the changeset viewer.