From 9f6887fdd7c0abe03144f29d9585ee71c645c8dc Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 6 Jan 2009 09:32:35 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@588 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- ports/ARMCM3-STM32F103/stm32_serial.c | 12 ++++++------ ports/ARMCM3/chcore.h | 9 +++++---- 2 files changed, 11 insertions(+), 10 deletions(-) (limited to 'ports') diff --git a/ports/ARMCM3-STM32F103/stm32_serial.c b/ports/ARMCM3-STM32F103/stm32_serial.c index fbb1775c9..de8cedf98 100644 --- a/ports/ARMCM3-STM32F103/stm32_serial.c +++ b/ports/ARMCM3-STM32F103/stm32_serial.c @@ -55,9 +55,9 @@ static void SetError(uint16_t sr, FullDuplexDriver *com) { sts |= SD_FRAMING_ERROR; if (sr & SR_LBD) sts |= SD_BREAK_DETECTED; - chSysLock(); + chSysLockI(); chFDDAddFlagsI(com, sts); - chSysUnlock(); + chSysUnlockI(); } static void ServeInterrupt(USART_TypeDef *u, FullDuplexDriver *com) { @@ -66,14 +66,14 @@ static void ServeInterrupt(USART_TypeDef *u, FullDuplexDriver *com) { if (sr & (SR_ORE | SR_FE | SR_PE | SR_LBD)) SetError(sr, com); if (sr & SR_RXNE) { - chSysLock(); + chSysLockI(); chFDDIncomingDataI(com, u->DR); - chSysUnlock(); + chSysUnlockI(); } if (sr & SR_TXE) { - chSysLock(); + chSysLockI(); msg_t b = chFDDRequestDataI(com); - chSysUnlock(); + chSysUnlockI(); if (b < Q_OK) u->CR1 &= ~CR1_TXEIE; else diff --git a/ports/ARMCM3/chcore.h b/ports/ARMCM3/chcore.h index cdd4a0625..36ee1f93b 100644 --- a/ports/ARMCM3/chcore.h +++ b/ports/ARMCM3/chcore.h @@ -135,10 +135,10 @@ typedef struct { /** * Computes the thread working area global size. */ -#define THD_WA_SIZE(n) StackAlign(sizeof(Thread) + \ - sizeof(struct intctx) + \ - sizeof(struct extctx) + \ - (n) + (INT_REQUIRED_STACK)) +#define THD_WA_SIZE(n) STACK_ALIGN(sizeof(Thread) + \ + sizeof(struct intctx) + \ + sizeof(struct extctx) + \ + (n) + (INT_REQUIRED_STACK)) /** * Macro used to allocate a thread working area aligned as both position and @@ -209,6 +209,7 @@ extern "C" { #endif void sys_puts(char *msg); void sys_halt(void); + void threadstart(void); #ifdef __cplusplus } #endif -- cgit v1.2.3