From 0cfe6d15dc535220ecf9a4c8f8aa5d4a0534f743 Mon Sep 17 00:00:00 2001 From: Joakim Gebart Date: Sat, 4 Jul 2015 10:06:16 +0200 Subject: [PATCH 1/6] sys/posix/pthread: Replace dINT by disableIRQ --- sys/posix/pthread/pthread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/posix/pthread/pthread.c b/sys/posix/pthread/pthread.c index d1014d4fe8..26b01ac923 100644 --- a/sys/posix/pthread/pthread.c +++ b/sys/posix/pthread/pthread.c @@ -206,7 +206,7 @@ void pthread_exit(void *retval) } } - dINT(); + disableIRQ(); if (self->stack) { msg_t m; m.content.ptr = self->stack; From 0d2efd5fe73e4437a85447a71bddd3fc79138d95 Mon Sep 17 00:00:00 2001 From: Joakim Gebart Date: Sat, 4 Jul 2015 10:06:36 +0200 Subject: [PATCH 2/6] native/syscalls: Use restoreIRQ --- cpu/native/syscalls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/native/syscalls.c b/cpu/native/syscalls.c index a2cab09d5c..1611913e84 100644 --- a/cpu/native/syscalls.c +++ b/cpu/native/syscalls.c @@ -121,7 +121,7 @@ void _native_syscall_leave(void) ) { _native_in_isr = 1; - disableIRQ(); + unsigned int mask = disableIRQ(); _native_cur_ctx = (ucontext_t *)sched_active_thread->sp; native_isr_context.uc_stack.ss_sp = __isr_stack; native_isr_context.uc_stack.ss_size = SIGSTKSZ; @@ -130,7 +130,7 @@ void _native_syscall_leave(void) if (swapcontext(_native_cur_ctx, &native_isr_context) == -1) { err(EXIT_FAILURE, "_native_syscall_leave: swapcontext"); } - enableIRQ(); + restoreIRQ(mask); } } From 199528d3fba5cf7a3ebe1447bb95efd582706e59 Mon Sep 17 00:00:00 2001 From: Joakim Gebart Date: Sat, 4 Jul 2015 10:11:05 +0200 Subject: [PATCH 3/6] cpu/atmega: remove dINT/eINT definitions --- cpu/atmega_common/include/cpu.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/cpu/atmega_common/include/cpu.h b/cpu/atmega_common/include/cpu.h index b7a83a9557..b7c7d83d2f 100644 --- a/cpu/atmega_common/include/cpu.h +++ b/cpu/atmega_common/include/cpu.h @@ -43,9 +43,6 @@ extern "C" { #endif -#define eINT enableIRQ -#define dINT disableIRQ - /** * @brief global in-ISR state variable */ From b6a88cba5f0369765ce3cf56c133d09f3f1e6fa4 Mon Sep 17 00:00:00 2001 From: Joakim Gebart Date: Sat, 4 Jul 2015 10:11:18 +0200 Subject: [PATCH 4/6] cpu/cortexm_common: remove dINT/eINT definitions --- cpu/cortexm_common/include/cpu.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/cpu/cortexm_common/include/cpu.h b/cpu/cortexm_common/include/cpu.h index aac211c10a..f836589a56 100644 --- a/cpu/cortexm_common/include/cpu.h +++ b/cpu/cortexm_common/include/cpu.h @@ -64,14 +64,6 @@ extern "C" { #endif /** @} */ -/** - * @brief Deprecated interrupt control function for backward compatibility - * @{ - */ -#define eINT enableIRQ -#define dINT disableIRQ -/** @} */ - /** * @brief Some members of the Cortex-M family have architecture specific * atomic operations in atomic_arch.c From 6473fa77d4edcf4295a8ee71c31b3307a28ace4e Mon Sep 17 00:00:00 2001 From: Joakim Gebart Date: Sat, 4 Jul 2015 10:11:36 +0200 Subject: [PATCH 5/6] cpu/arm7_common: remove dINT/eINT definitions --- cpu/arm7_common/common.s | 19 ------------------- cpu/arm7_common/include/arm_cpu.h | 3 --- 2 files changed, 22 deletions(-) diff --git a/cpu/arm7_common/common.s b/cpu/arm7_common/common.s index ec828fbe81..a9c98d2daf 100644 --- a/cpu/arm7_common/common.s +++ b/cpu/arm7_common/common.s @@ -40,25 +40,6 @@ .global cpu_switch_context_exit .global task_return .global ctx_switch - .global dINT - .global eINT - -.func -dINT: - mrs r0, cpsr - - orr r0, r0, #NOINT /* Disable Int */ - msr CPSR_c, r0 - mov pc,lr -.endfunc - -.func -eINT: - mrs r0, cpsr - and r0, r0, #~NOINT /* Enable Int */ - msr CPSR_c, r0 - mov pc,lr -.endfunc ctx_switch: /* Save return address on stack */ diff --git a/cpu/arm7_common/include/arm_cpu.h b/cpu/arm7_common/include/arm_cpu.h index d883753fae..b196e69875 100644 --- a/cpu/arm7_common/include/arm_cpu.h +++ b/cpu/arm7_common/include/arm_cpu.h @@ -20,9 +20,6 @@ #define NEW_TASK_CPSR 0x1F #define WORDSIZE 32 -extern void dINT(void); -extern void eINT(void); - uint32_t get_system_speed(void); void cpu_clock_scale(uint32_t source, uint32_t target, uint32_t *prescale); From 27565a655e8d233bef3d6c1809ad3b5cee8c8762 Mon Sep 17 00:00:00 2001 From: Joakim Gebart Date: Mon, 17 Aug 2015 11:50:40 +0200 Subject: [PATCH 6/6] cpu/native: remove dINT/eINT definitions --- cpu/native/include/cpu.h | 4 ---- cpu/native/irq_cpu.c | 11 ----------- 2 files changed, 15 deletions(-) diff --git a/cpu/native/include/cpu.h b/cpu/native/include/cpu.h index 2bfe4dbb53..56be162ef4 100644 --- a/cpu/native/include/cpu.h +++ b/cpu/native/include/cpu.h @@ -26,10 +26,6 @@ extern "C" { #endif -/* TODO: remove once these have been removed from RIOT: */ -void dINT(void); -void eINT(void); - /** * @brief Prints the last instruction's address */ diff --git a/cpu/native/irq_cpu.c b/cpu/native/irq_cpu.c index 16fcbcbce7..2d50f25403 100644 --- a/cpu/native/irq_cpu.c +++ b/cpu/native/irq_cpu.c @@ -218,17 +218,6 @@ int inISR(void) return _native_in_isr; } - -void dINT(void) -{ - disableIRQ(); -} - -void eINT(void) -{ - enableIRQ(); -} - int _native_popsig(void) { int nread, nleft, i;