diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-08-13 12:32:10 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-08-13 12:32:10 +0000 |
commit | 978e34eed2ed391f57b25e007b63f2938f8af0f6 (patch) | |
tree | 34099b39b70bce585bdfe64f20713b8ec82f6fe8 /os/ports | |
parent | aaad958769e757093a258cfdd5c75f515534fd7a (diff) | |
download | ChibiOS-978e34eed2ed391f57b25e007b63f2938f8af0f6.tar.gz ChibiOS-978e34eed2ed391f57b25e007b63f2938f8af0f6.tar.bz2 ChibiOS-978e34eed2ed391f57b25e007b63f2938f8af0f6.zip |
System state check verified in ARM GCC port.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3225 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/ports')
-rw-r--r-- | os/ports/GCC/ARM/chcoreasm.s | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/os/ports/GCC/ARM/chcoreasm.s b/os/ports/GCC/ARM/chcoreasm.s index 2266d3f1a..9b65c14b0 100644 --- a/os/ports/GCC/ARM/chcoreasm.s +++ b/os/ports/GCC/ARM/chcoreasm.s @@ -28,6 +28,9 @@ #include "chconf.h"
+#define FALSE 0
+#define TRUE 1
+
#if !defined(__DOXYGEN__)
.set MODE_USR, 0x10
@@ -190,12 +193,24 @@ _port_irq_common: add r0, pc, #1
bx r0
.code 16
+#if CH_DBG_SYSTEM_STATE_CHECK
+ bl dbg_check_lock
+#endif
bl chSchDoReschedule
+#if CH_DBG_SYSTEM_STATE_CHECK
+ bl dbg_check_unlock
+#endif
mov lr, pc
bx lr
.code 32
#else /* !THUMB_NO_INTERWORKING */
+#if CH_DBG_SYSTEM_STATE_CHECK
+ bl dbg_check_lock
+#endif
bl chSchDoReschedule
+#if CH_DBG_SYSTEM_STATE_CHECK
+ bl dbg_check_unlock
+#endif
#endif /* !THUMB_NO_INTERWORKING */
// Re-establish the IRQ conditions again.
@@ -210,12 +225,18 @@ _port_irq_common: /*
* Threads trampoline code.
- * NOTE: The threads always start in ARM mode then switch to the thread-function mode.
+ * NOTE: The threads always start in ARM mode and then switches to the
+ * thread-function mode.
*/
.balign 16
.code 32
.globl _port_thread_start
_port_thread_start:
+#if CH_DBG_SYSTEM_STATE_CHECK
+ mov r0, #0
+ ldr r1, =dbg_lock_cnt
+ str r0, [r1]
+#endif
msr CPSR_c, #MODE_SYS
#ifndef THUMB_NO_INTERWORKING
mov r0, r5
|