aboutsummaryrefslogtreecommitdiffstats
path: root/os/kernel
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-05-18 09:03:50 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-05-18 09:03:50 +0000
commitb4aa14e88c9e28a16a5f9c0c220fac6cc36750ad (patch)
treefc775ac9004d2808a72e644c28629f53c4767411 /os/kernel
parentade5cc3c6fdb41270ff0f483a8daa44d28d1064c (diff)
downloadChibiOS-b4aa14e88c9e28a16a5f9c0c220fac6cc36750ad.tar.gz
ChibiOS-b4aa14e88c9e28a16a5f9c0c220fac6cc36750ad.tar.bz2
ChibiOS-b4aa14e88c9e28a16a5f9c0c220fac6cc36750ad.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2971 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel')
-rw-r--r--os/kernel/include/chschd.h6
-rw-r--r--os/kernel/src/chsys.c2
-rw-r--r--os/kernel/templates/chconf.h20
-rw-r--r--os/kernel/templates/chcore.h8
4 files changed, 5 insertions, 31 deletions
diff --git a/os/kernel/include/chschd.h b/os/kernel/include/chschd.h
index 1cd8e0664..e154da863 100644
--- a/os/kernel/include/chschd.h
+++ b/os/kernel/include/chschd.h
@@ -84,10 +84,8 @@ typedef struct {
#if CH_TIME_QUANTUM > 0
cnt_t r_preempt; /**< @brief Round robin counter. */
#endif
-#ifndef CH_CURRP_REGISTER_CACHE
Thread *r_current; /**< @brief The currently running
thread. */
-#endif
} ReadyList;
#endif /* !defined(PORT_OPTIMIZED_READYLIST_STRUCT) */
@@ -103,11 +101,7 @@ extern ReadyList rlist;
* (currp = something), use @p setcurrp() instead.
*/
#if !defined(PORT_OPTIMIZED_CURRP) || defined(__DOXYGEN__)
-#if !defined(CH_CURRP_REGISTER_CACHE) || defined(__DOXYGEN__)
#define currp rlist.r_current
-#else /* defined(CH_CURRP_REGISTER_CACHE) */
-register Thread *currp asm(CH_CURRP_REGISTER_CACHE);
-#endif /* defined(CH_CURRP_REGISTER_CACHE) */
#endif /* !defined(PORT_OPTIMIZED_CURRP) */
/**
diff --git a/os/kernel/src/chsys.c b/os/kernel/src/chsys.c
index 13a1a53fa..6892ec73a 100644
--- a/os/kernel/src/chsys.c
+++ b/os/kernel/src/chsys.c
@@ -38,7 +38,7 @@
#if !CH_NO_IDLE_THREAD || defined(__DOXYGEN__)
/**
* @brief Idle thread working area.
- * @see IDLE_THREAD_STACK_SIZE
+ * @see PORT_IDLE_THREAD_STACK_SIZE
*/
WORKING_AREA(_idle_thread_wa, PORT_IDLE_THREAD_STACK_SIZE);
diff --git a/os/kernel/templates/chconf.h b/os/kernel/templates/chconf.h
index 14109b635..ccde82347 100644
--- a/os/kernel/templates/chconf.h
+++ b/os/kernel/templates/chconf.h
@@ -123,26 +123,6 @@
#define CH_OPTIMIZE_SPEED TRUE
#endif
-/**
- * @brief Exotic optimization.
- * @details If defined then a CPU register is used as storage for the global
- * @p currp variable. Caching this variable in a register greatly
- * improves both space and time OS efficiency. A side effect is that
- * one less register has to be saved during the context switch
- * resulting in lower RAM usage and faster context switch.
- *
- * @note This option is only usable with the GCC compiler and is only useful
- * on processors with many registers like ARM cores.
- * @note If this option is enabled then ALL the libraries linked to the
- * ChibiOS/RT code <b>must</b> be recompiled with the GCC option @p
- * -ffixed-@<reg@>.
- * @note This option must be enabled in the Makefile, it is listed here for
- * documentation only.
- */
-#if defined(__DOXYGEN__)
-#define CH_CURRP_REGISTER_CACHE "reg"
-#endif
-
/*===========================================================================*/
/* Subsystem options. */
/*===========================================================================*/
diff --git a/os/kernel/templates/chcore.h b/os/kernel/templates/chcore.h
index 2c69362b2..5c8236c7b 100644
--- a/os/kernel/templates/chcore.h
+++ b/os/kernel/templates/chcore.h
@@ -47,10 +47,10 @@
* @brief Stack size for the system idle thread.
* @details This size depends on the idle thread implementation, usually
* the idle thread should take no more space than those reserved
- * by @p INT_REQUIRED_STACK.
+ * by @p PORT_INT_REQUIRED_STACK.
*/
#ifndef PORT_IDLE_THREAD_STACK_SIZE
-#define PORT_IDLE_THREAD_STACK_SIZE 0
+#define PORT_IDLE_THREAD_STACK_SIZE 0
#endif
/**
@@ -62,7 +62,7 @@
* @p extctx is known to be zero.
*/
#ifndef PORT_INT_REQUIRED_STACK
-#define PORT_INT_REQUIRED_STACK 0
+#define PORT_INT_REQUIRED_STACK 0
#endif
/*===========================================================================*/
@@ -151,7 +151,7 @@ struct context {
#define THD_WA_SIZE(n) STACK_ALIGN(sizeof(Thread) + \
sizeof(struct intctx) + \
sizeof(struct extctx) + \
- (n) + (INT_REQUIRED_STACK))
+ (n) + (PORT_INT_REQUIRED_STACK))
/**
* @brief Static working area allocation.