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_kernel/switch.s

    r301 r709  
    11/******************************************************************************
    2 * This function receives two arguments that are the current task context
    3 * (virtual) addresses and the next task context (virtual) address.
     2* This function receives two arguments that are the current thread context
     3* (virtual) addresses and the next thread context (virtual) address.
    44*
    55* This function should be called in a critical section
     
    1515******************************************************************************/
    1616
    17     .globl  _task_switch
    18     .func   _task_switch
    19     .type   _task_switch, %function
     17    .globl  _thread_switch
     18    .func   _thread_switch
     19    .type   _thread_switch, %function
    2020
    21 _task_switch:
     21_thread_switch:
    2222
    23     /* save _current task context */
    24     add     $27,    $4,     $0  /* $27 <= &context[curr_task_id] */
     23    /* first step : save current thread context */
     24    add     $27,    $4,     $0  /* $27 <= &context[current] */
    2525
    2626    .set noat
     
    7070    sw      $26,    39*4($27)   /* ctx[35] <= PTPR */
    7171
    72     /* restore next task context */
    73     add     $27,    $5,     $0  /* $27<= &context[next_task_id] */
     72    /* second step : restore next thread context */
     73    add     $27,    $5,     $0  /* $27<= &context[next] */
    7474
    7575    .set noat
     
    123123
    124124    .endfunc
    125     .size _task_switch, .-_task_switch
     125    .size _thread_switch, .-_thread_switch
    126126
Note: See TracChangeset for help on using the changeset viewer.