summaryrefslogtreecommitdiff
path: root/cpukit/rtems/src/getcurrentprocessor.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-03-03 13:45:50 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-03-04 08:43:45 +0100
commit8b73ee50238d5f22db792bf8cc573a001f52065f (patch)
treec2522f35266d86ca51c74daae66bab4f09c7bae0 /cpukit/rtems/src/getcurrentprocessor.c
parentfdeaa64e1786e7f18814d8c7eae219332d672c27 (diff)
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.
Diffstat (limited to 'cpukit/rtems/src/getcurrentprocessor.c')
-rw-r--r--cpukit/rtems/src/getcurrentprocessor.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/cpukit/rtems/src/getcurrentprocessor.c b/cpukit/rtems/src/getcurrentprocessor.c
deleted file mode 100644
index 10811ade66..0000000000
--- a/cpukit/rtems/src/getcurrentprocessor.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (c) 2014 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#if HAVE_CONFIG_H
- #include "config.h"
-#endif
-
-#include <rtems/rtems/tasks.h>
-#include <rtems/score/smp.h>
-
-uint32_t rtems_scheduler_get_processor(void)
-{
- return _SMP_Get_current_processor();
-}