x86: streamline irq_lock()/irq_unlock()
The routines _int_latency_start() and _int_latency_stop() have been replaced by macros that evaluate to nothing when the kernel config option INT_LATENCY_BENCHMARK is not enabled thereby giving a performance boost to the x86 versions of irq_lock() and and irq_unlock(). Change-Id: Iabfa7bf001f5b8396e7bcf5eebd6b1aa342bac46 Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
This commit is contained in:
parent
3c350ffb39
commit
4146b346b4
3 changed files with 7 additions and 11 deletions
|
@ -282,8 +282,13 @@ typedef struct nanoIsf {
|
|||
|
||||
#ifndef _ASMLANGUAGE
|
||||
|
||||
#ifdef CONFIG_INT_LATENCY_BENCHMARK
|
||||
void _int_latency_start(void);
|
||||
void _int_latency_stop(void);
|
||||
#else
|
||||
#define _int_latency_start() do { } while (0)
|
||||
#define _int_latency_stop() do { } while (0)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Disable all interrupts on the CPU (inline)
|
||||
|
|
|
@ -7,8 +7,9 @@ asflags-y := ${ccflags-y}
|
|||
obj-y = nano_fiber.o nano_lifo.o \
|
||||
nano_fifo.o nano_stack.o nano_sys_clock.o \
|
||||
nano_context.o nano_init.o nano_sema.o \
|
||||
version.o device.o int_latency_bench.o
|
||||
version.o device.o
|
||||
|
||||
obj-$(CONFIG_INT_LATENCY_BENCHMARK) += int_latency_bench.o
|
||||
obj-$(CONFIG_NANO_TIMEOUTS) += nano_sleep.o
|
||||
obj-$(CONFIG_STACK_CANARIES) += compiler_stack_protect.o
|
||||
obj-$(CONFIG_ADVANCED_POWER_MANAGEMENT) += idle.o
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_INT_LATENCY_BENCHMARK
|
||||
|
||||
#include "toolchain.h"
|
||||
#include "sections.h"
|
||||
#include <stdint.h> /* uint32_t */
|
||||
|
@ -235,11 +233,3 @@ void int_latency_show(void)
|
|||
int_locked_latency_min = ULONG_MAX;
|
||||
int_locked_latency_max = 0;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void int_latency_init(void) {};
|
||||
void _int_latency_stop(void) {};
|
||||
void _int_latency_start(void) {};
|
||||
|
||||
#endif /* CONFIG_INT_LATENCY_BENCHMARK */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue