summaryrefslogtreecommitdiff
path: root/Source/portable/GCC/ARM_CM3/portmacro.h
diff options
context:
space:
mode:
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2007-09-17 10:07:48 +0000
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2007-09-17 10:07:48 +0000
commit4a19a2c5511de2e1dca22005302d544e98505279 (patch)
treec40b6b0ffdd514e20fbe759a36596ef6dfd8fb25 /Source/portable/GCC/ARM_CM3/portmacro.h
parent64dcb6b951afc6159bcb701594fbe6720bc73e26 (diff)
downloadfreertos-4a19a2c5511de2e1dca22005302d544e98505279.tar.gz
freertos-4a19a2c5511de2e1dca22005302d544e98505279.tar.bz2
freertos-4a19a2c5511de2e1dca22005302d544e98505279.tar.xz
Update to V4.5.0 files and directory structure.
git-svn-id: https://freertos.svn.sourceforge.net/svnroot/freertos/trunk@109 1d2547de-c912-0410-9cb9-b8ca96c0e9e2
Diffstat (limited to 'Source/portable/GCC/ARM_CM3/portmacro.h')
-rw-r--r--Source/portable/GCC/ARM_CM3/portmacro.h37
1 files changed, 33 insertions, 4 deletions
diff --git a/Source/portable/GCC/ARM_CM3/portmacro.h b/Source/portable/GCC/ARM_CM3/portmacro.h
index 10de80e1..d4f23640 100644
--- a/Source/portable/GCC/ARM_CM3/portmacro.h
+++ b/Source/portable/GCC/ARM_CM3/portmacro.h
@@ -1,5 +1,5 @@
/*
- FreeRTOS.org V4.4.0 - Copyright (C) 2003-2007 Richard Barry.
+ FreeRTOS.org V4.5.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution.
@@ -33,6 +33,12 @@
***************************************************************************
*/
+/*
+ Change from V4.4.0:
+
+ + Introduced usage of configKERNEL_INTERRUPT_PRIORITY macro to set the
+ interrupt priority used by the kernel.
+*/
#ifndef PORTMACRO_H
#define PORTMACRO_H
@@ -83,12 +89,35 @@ extern void vPortYieldFromISR( void );
/* Critical section management. */
-extern void vPortEnableInterrupts( void );
+#define vPortSetInterruptMask() \
+ __asm volatile \
+ ( \
+ " push { r0 } \n" \
+ " ldr r0, =ulKernelPriority \n" \
+ " ldr r0, [r0] \n" \
+ " msr basepri, r0 \n" \
+ " pop { r0 } " \
+ )
+
+/*-----------------------------------------------------------*/
+
+#define vPortClearInterruptMask() \
+ __asm volatile \
+ ( \
+ " push { r0 } \n" \
+ " mov r0, #0 \n" \
+ " msr basepri, r0 \n" \
+ " pop { r0 } " \
+ )
+
+/*-----------------------------------------------------------*/
+
+
extern void vPortEnterCritical( void );
extern void vPortExitCritical( void );
-#define portDISABLE_INTERRUPTS() __asm volatile( "cpsid i" )
-#define portENABLE_INTERRUPTS() __asm volatile( "cpsie i" )
+#define portDISABLE_INTERRUPTS() vPortSetInterruptMask();
+#define portENABLE_INTERRUPTS() vPortClearInterruptMask();
#define portENTER_CRITICAL() vPortEnterCritical()
#define portEXIT_CRITICAL() vPortExitCritical()
/*-----------------------------------------------------------*/