Changeset a49a3c8e in rtems


Ignore:
Timestamp:
Jun 27, 2018, 6:37:34 AM (10 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
04698eb
Parents:
9510742
git-author:
Sebastian Huber <sebastian.huber@…> (06/27/18 06:37:34)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/29/18 08:04:37)
Message:

riscv: Do not clear thread context

Do not clear the complete thread context. Initialize only the necessary
members. The Context_Control::is_executing member must be preserved
across _CPU_Context_Initialize() calls.

Update #3433.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/cpu/riscv/riscv-context-initialize.c

    r9510742 ra49a3c8e  
    3333#endif
    3434
    35 #include <string.h>
    36 
    3735#include <rtems/score/cpu.h>
    3836#include <rtems/score/riscv-utility.h>
    39 #include <rtems/score/interr.h>
    4037
    4138void _CPU_Context_Initialize(
     
    5350  uintptr_t stack_high = stack + stack_area_size;
    5451
    55   memset(context, 0, sizeof(*context));
    56 
    5752  /* Stack Pointer - sp/x2 */
    5853  context->x[2] = stack_high;
     
    6257  context->x[1] = (uintptr_t) entry_point;
    6358
     59  context->isr_dispatch_disable = 0;
     60
    6461  /* Enable interrupts and FP */
    6562  context->mstatus = MSTATUS_FS | MSTATUS_MIE;
Note: See TracChangeset for help on using the changeset viewer.