Ignore:
Timestamp:
Oct 1, 2015, 4:20:46 PM (9 years ago)
Author:
alain
Message:

Major release: Change the task model to implement the POSIX threads API.

  • The shell "exec" and "kill" commands can be used to activate/de-activate the applications.
  • The "pause", "resume", and "context" commands can be used to stop, restart, a single thtead or to display the thread context.

This version has been tested on the following multi-threaded applications,
that have been modified to use the POSIX threads:

  • classif
  • convol
  • transpose
  • gameoflife
  • raycast
File:
1 edited

Legend:

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

    r645 r709  
    1414//
    1515// 2/ a description of the applications (called vspaces) to be - statically -
    16 // launched on the platform. The number of parallel tasks per application is
     16// mapped on the platform. The number of parallel threads per application is
    1717// variable (can be one). Each vspace contains a variable number
    1818// of virtual segments (called vsegs).
    1919//
    20 // 3/ the mapping directives: both tasks on processors, and software objects
    21 // (vsegs) on the physical memory banks (psegs).
     20// 3/ the mapping directives: both threads on processors, and software objects
     21// (vsegs) on physical memory banks (psegs).
    2222//
    2323// The mapping_info data structure is organised as the concatenation of
     
    2828// - mapping_vspace_t   vspace[] 
    2929// - mapping_vseg_t     vseg[]     
    30 // - mapping_task_t     task[] 
     30// - mapping_thread_t   thread[] 
    3131// - mapping_proc_t     proc[] 
    3232// - mapping_irq_t      irq[]   
     
    4444#define MAPPING_VSEG_SIZE     sizeof(mapping_vseg_t)
    4545#define MAPPING_PSEG_SIZE     sizeof(mapping_pseg_t)
    46 #define MAPPING_TASK_SIZE     sizeof(mapping_task_t)
     46#define MAPPING_THREAD_SIZE   sizeof(mapping_thread_t)
    4747#define MAPPING_PROC_SIZE     sizeof(mapping_proc_t)
    4848#define MAPPING_IRQ_SIZE      sizeof(mapping_irq_t)
     
    152152    unsigned int    psegs;           // total number of physical segments
    153153    unsigned int    vsegs;           // total number of virtual segments
    154     unsigned int    tasks;           // total number of tasks
     154    unsigned int    threads;         // total number of threads
    155155    unsigned int    procs;           // total number of processors
    156156    unsigned int    irqs;            // total number of irqs
    157157    unsigned int    periphs;         // total number of peripherals
    158     char name[64];                   // mapping name
     158    char name[256];                  // mapping name
    159159} mapping_header_t;
    160160
     
    183183    unsigned int    start_vseg_id;   // vseg containing start vector index
    184184    unsigned int    vsegs;           // number of vsegs in vspace
    185     unsigned int    tasks;           // number of tasks in vspace
     185    unsigned int    threads;         // number of threads in vspace
    186186    unsigned int    vseg_offset;     // global index of first vseg in vspace
    187     unsigned int    task_offset;     // global index of first task in vspace
     187    unsigned int    thread_offset;   // global index of first thread in vspace
    188188    unsigned int    active;          // always active if non zero
    189189} mapping_vspace_t;
     
    220220
    221221
    222 //////////////////////////////////////////////////////
    223 typedef struct __attribute__((packed))  mapping_task_s
    224 {
    225     char            name[32];        // task name (unique in vspace)
     222////////////////////////////////////////////////////////
     223typedef struct __attribute__((packed))  mapping_thread_s
     224{
     225    char            name[32];        // thread name (unique in vspace)
    226226    unsigned int    clusterid;       // global index in clusters set
    227227    unsigned int    proclocid;       // processor local index (inside cluster)
    228     unsigned int    trdid;           // thread index in vspace
     228    unsigned int    is_main;         // this thread is the application entry point
    229229    unsigned int    stack_vseg_id;   // global index for vseg containing stack
    230230    unsigned int    heap_vseg_id;    // global index for vseg containing heap
    231231    unsigned int    startid;         // index in start_vector
    232     unsigned int    ltid;            // task index in scheduler (dynamically defined)
    233 } mapping_task_t;
     232    unsigned int    ltid;            // thread index in scheduler (dynamically defined)
     233} mapping_thread_t;
    234234
    235235
Note: See TracChangeset for help on using the changeset viewer.