Ignore:
Timestamp:
Jun 26, 2018, 5:15:28 AM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
9704d86f
Parents:
3be4478f
git-author:
Sebastian Huber <sebastian.huber@…> (06/26/18 05:15:28)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/28/18 13:03:23)
Message:

riscv: Add _CPU_Get_current_per_CPU_control()

Update #3433.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/cpu/riscv/include/rtems/score/cpuimpl.h

    r3be4478f r0fd8287  
    5353#endif
    5454
     55#ifdef RTEMS_SMP
     56
     57static inline struct Per_CPU_Control *_RISCV_Get_current_per_CPU_control( void )
     58{
     59  struct Per_CPU_Control *cpu_self;
     60
     61  __asm__ volatile ( "csrr %0, mscratch" : "=r" ( cpu_self ) );
     62
     63  return cpu_self;
     64}
     65
     66#define _CPU_Get_current_per_CPU_control() _RISCV_Get_current_per_CPU_control()
     67
     68#endif /* RTEMS_SMP */
     69
    5570#ifdef __cplusplus
    5671}
Note: See TracChangeset for help on using the changeset viewer.