summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbernard.xiong <[email protected]>2010-04-14 00:40:20 +0000
committerbernard.xiong <[email protected]>2010-04-14 00:40:20 +0000
commit23ea4f1b742ecb794e4ee657bfc1a3db0382bbcd (patch)
tree744e290790e9b407d0f6d8919ff77cc9705e705a /src
parent2fcd4bccbdc9ebc00ba4de3d4dd9327b325545bc (diff)
add __ICCM16C__ compiler support.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@621 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'src')
-rw-r--r--src/scheduler.c2
-rw-r--r--src/thread.c6
-rw-r--r--src/timer.c2
3 files changed, 5 insertions, 5 deletions
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;