Changeset 267 for soft/giet_vm/giet_xml


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

Location:
soft/giet_vm/giet_xml
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_xml/mapping_info.h

    r263 r267  
    252252    unsigned int    clusterid;       // linear index in array of clusters
    253253    unsigned int    proclocid;       // processor local index (inside cluster)
     254    unsigned int    trdid;           // thread index in vspace
    254255    unsigned int    stack_vobjid;    // stack vobj index in vspace
    255256    unsigned int    heap_vobjid;     // heap vobj index in vspace
  • soft/giet_vm/giet_xml/xml_parser.c

    r263 r267  
    463463
    464464    ///////// get x coordinate
    465      x = getIntValue(reader, "x", &ok);
     465    task[task_index]->trdid = getIntValue(reader, "trdid", &ok);
     466#if XML_PARSER_DEBUG
     467printf("      x         = %d\n", x);
     468#endif
     469    if ( !ok )
     470    {
     471        task[task_index]->trdid = task_loc_index;
     472        printf("[XML WARNING] missing trdid (thread index) attribute "
     473               "for task in vspace %d. Using value %d\n"
     474               , vspace_index, task_loc_index);
     475    } 
     476
     477    ///////// get x coordinate
     478    x = getIntValue(reader, "x", &ok);
    466479#if XML_PARSER_DEBUG
    467480printf("      x         = %d\n", x);
     
    475488
    476489    ///////// get y coordinate
    477      y = getIntValue(reader, "y", &ok);
     490    y = getIntValue(reader, "y", &ok);
    478491#if XML_PARSER_DEBUG
    479492printf("      y         = %d\n", y);
Note: See TracChangeset for help on using the changeset viewer.