diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-03-12 18:46:53 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-03-12 18:46:53 +0000 |
commit | f43dbdc61b885a617a0e8d73bf565e48ee4d96ba (patch) | |
tree | 3e1d207bd084e43edcad0a9b9ab0a83282beca47 /ports | |
parent | 93c5d059c08a038c64cef7729d6109b096c6fb23 (diff) | |
download | ChibiOS-f43dbdc61b885a617a0e8d73bf565e48ee4d96ba.tar.gz ChibiOS-f43dbdc61b885a617a0e8d73bf565e48ee4d96ba.tar.bz2 ChibiOS-f43dbdc61b885a617a0e8d73bf565e48ee4d96ba.zip |
Cortex-M3 optimization.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@834 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'ports')
-rw-r--r-- | ports/ARMCM3/chcore.c | 13 | ||||
-rw-r--r-- | ports/ARMCM3/chcore.h | 5 |
2 files changed, 2 insertions, 16 deletions
diff --git a/ports/ARMCM3/chcore.c b/ports/ARMCM3/chcore.c index 4c23b2da4..b075ec27c 100644 --- a/ports/ARMCM3/chcore.c +++ b/ports/ARMCM3/chcore.c @@ -43,19 +43,6 @@ void port_halt(void) { }
/**
- * Start a thread by invoking its work function.
- * If the work function returns @p chThdExit() is automatically invoked.
- */
-/** @cond never */
-__attribute__((naked, weak))
-/** @endcond */
-void threadstart(void) {
-
- asm volatile ("blx r1 \n\t" \
- "bl chThdExit");
-}
-
-/**
* System Timer vector.
* This interrupt is used as system tick.
* @note The timer is initialized in the board setup code.
diff --git a/ports/ARMCM3/chcore.h b/ports/ARMCM3/chcore.h index dd810df36..477e2fede 100644 --- a/ports/ARMCM3/chcore.h +++ b/ports/ARMCM3/chcore.h @@ -155,8 +155,8 @@ struct context { tp->p_ctx.r13->basepri = BASEPRI_USER; \
tp->p_ctx.r13->lr_exc = (regarm_t)0xFFFFFFFD; \
tp->p_ctx.r13->r0 = arg; \
- tp->p_ctx.r13->r1 = pf; \
- tp->p_ctx.r13->pc = threadstart; \
+ tp->p_ctx.r13->lr_thd = chThdExit; \
+ tp->p_ctx.r13->pc = pf; \
tp->p_ctx.r13->xpsr = (regarm_t)0x01000000; \
}
@@ -303,7 +303,6 @@ struct context { extern "C" {
#endif
void port_halt(void);
- void threadstart(void);
#ifdef __cplusplus
}
#endif
|