From 23ea4f1b742ecb794e4ee657bfc1a3db0382bbcd Mon Sep 17 00:00:00 2001 From: "bernard.xiong" Date: Wed, 14 Apr 2010 00:40:20 +0000 Subject: add __ICCM16C__ compiler support. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@621 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- src/scheduler.c | 2 +- src/thread.c | 6 +++--- src/timer.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/scheduler.c b/src/scheduler.c index a414840850..fdfd4289e1 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -29,7 +29,7 @@ /* #define SCHEDULER_DEBUG */ static rt_int16_t rt_scheduler_lock_nest; -extern rt_uint32_t rt_interrupt_nest; +extern volatile rt_uint8_t rt_interrupt_nest; rt_list_t rt_thread_priority_table[RT_THREAD_PRIORITY_MAX]; struct rt_thread* rt_current_thread; diff --git a/src/thread.c b/src/thread.c index b8859f9a0c..d7320e3de0 100644 --- a/src/thread.c +++ b/src/thread.c @@ -212,10 +212,10 @@ rt_err_t rt_thread_startup (rt_thread_t thread) /* calculate priority attribute */ #if RT_THREAD_PRIORITY_MAX > 32 thread->number = thread->current_priority >> 3; /* 5bit */ - thread->number_mask = 1 << thread->number; - thread->high_mask = 1 << (thread->current_priority & 0x07); /* 3bit */ + thread->number_mask = 1L << thread->number; + thread->high_mask = 1L << (thread->current_priority & 0x07); /* 3bit */ #else - thread->number_mask = 1 << thread->current_priority; + thread->number_mask = 1L << thread->current_priority; //1L means long int,fixed compile mistake with IAR EW M16C v3.401,fify 20100410 #endif #ifdef THREAD_DEBUG diff --git a/src/timer.c b/src/timer.c index a8e1f9b479..33efcbd22a 100644 --- a/src/timer.c +++ b/src/timer.c @@ -346,7 +346,7 @@ rt_err_t rt_timer_control(rt_timer_t timer, rt_uint8_t cmd, void* arg) #ifdef RT_USING_TIMER_SOFT void rt_soft_timer_tick_increase (void); #endif -void rt_timer_check() +void rt_timer_check(void) { rt_tick_t current_tick; rt_list_t *n; -- cgit v1.3.1