Changeset 8b73ee5 in rtems


Ignore:
Timestamp:
Mar 3, 2020, 12:45:50 PM (4 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
0b0cd93
Parents:
fdeaa64
git-author:
Sebastian Huber <sebastian.huber@…> (03/03/20 12:45:50)
git-committer:
Sebastian Huber <sebastian.huber@…> (03/04/20 07:43:45)
Message:

rtems: rtems_scheduler_get_processor_maximum()

In uniprocessor configurations, use compile-time constants for
rtems_scheduler_get_processor_maximum() and
rtems_scheduler_get_processor(). This helps compilers and static
analyzers to deduce that some loop bodies are only executed once and
some conditional statements have a fixed outcome (may improve code
generation and reduce false positives).

In SMP configurations, directly provide the internal implementation for
performance reasons.

Location:
cpukit
Files:
2 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/Makefile.am

    rfdeaa64 r8b73ee5  
    701701librtemscpu_a_SOURCES += rtems/src/eventsurrender.c
    702702librtemscpu_a_SOURCES += rtems/src/getapiconfig.c
    703 librtemscpu_a_SOURCES += rtems/src/getcurrentprocessor.c
    704 librtemscpu_a_SOURCES += rtems/src/getprocessorcount.c
    705703librtemscpu_a_SOURCES += rtems/src/intrbody.c
    706704librtemscpu_a_SOURCES += rtems/src/intrcatch.c
  • cpukit/include/rtems/rtems/tasks.h

    rfdeaa64 r8b73ee5  
    2222#include <rtems/rtems/status.h>
    2323#include <rtems/rtems/types.h>
     24#include <rtems/score/smp.h>
    2425
    2526#ifdef __cplusplus
     
    601602 * @return The index of the current processor.
    602603 */
    603 uint32_t rtems_scheduler_get_processor( void );
     604#define rtems_scheduler_get_processor() _SMP_Get_current_processor()
    604605
    605606/**
     
    634635 * @see rtems_scheduler_add_processor() and rtems_scheduler_remove_processor().
    635636 */
    636 RTEMS_CONST uint32_t rtems_scheduler_get_processor_maximum( void );
     637#define rtems_scheduler_get_processor_maximum() _SMP_Get_processor_maximum()
    637638
    638639/**
Note: See TracChangeset for help on using the changeset viewer.