aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2016-02-22 13:12:50 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2016-02-22 13:12:50 +0000
commit03eb35736c5a3ea65f571fc0c4c1811ccbd49780 (patch)
treee1bb8b1adf7c6ba465aa3b17719278f5ee2aa01a /os
parentc40bc2c09dd3fe9c3033a075ce01aab11a5cf559 (diff)
downloadChibiOS-03eb35736c5a3ea65f571fc0c4c1811ccbd49780.tar.gz
ChibiOS-03eb35736c5a3ea65f571fc0c4c1811ccbd49780.tar.bz2
ChibiOS-03eb35736c5a3ea65f571fc0c4c1811ccbd49780.zip
Renamed r13 context field in sp (ARM ports). Extended the priorities range from 127 to 255.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8921 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/common/ports/ARM/chcore.h12
-rw-r--r--os/common/ports/ARMCMx/chcore.h2
-rw-r--r--os/common/ports/ARMCMx/chcore_v6m.h10
-rw-r--r--os/common/ports/ARMCMx/chcore_v7m.h10
-rw-r--r--os/rt/include/chschd.h5
-rw-r--r--os/various/shell/shell_cmd.c2
6 files changed, 20 insertions, 21 deletions
diff --git a/os/common/ports/ARM/chcore.h b/os/common/ports/ARM/chcore.h
index c83d19e23..f424e9f1f 100644
--- a/os/common/ports/ARM/chcore.h
+++ b/os/common/ports/ARM/chcore.h
@@ -247,7 +247,7 @@ struct port_intctx {
* at context switch time.
*/
struct port_context {
- struct port_intctx *r13;
+ struct port_intctx *sp;
};
/*===========================================================================*/
@@ -260,11 +260,11 @@ struct port_context {
* by an @p port_intctx structure.
*/
#define PORT_SETUP_CONTEXT(tp, wbase, wtop, pf, arg) { \
- (tp)->ctx.r13 = (struct port_intctx *)((uint8_t *)(wtop) - \
- sizeof (struct port_intctx)); \
- (tp)->ctx.r13->r4 = (regarm_t)(pf); \
- (tp)->ctx.r13->r5 = (regarm_t)(arg); \
- (tp)->ctx.r13->lr = (regarm_t)(_port_thread_start); \
+ (tp)->ctx.sp = (struct port_intctx *)((uint8_t *)(wtop) - \
+ sizeof (struct port_intctx)); \
+ (tp)->ctx.sp->r4 = (regarm_t)(pf); \
+ (tp)->ctx.sp->r5 = (regarm_t)(arg); \
+ (tp)->ctx.sp->lr = (regarm_t)(_port_thread_start); \
}
/**
diff --git a/os/common/ports/ARMCMx/chcore.h b/os/common/ports/ARMCMx/chcore.h
index 16743bbdf..32265cb58 100644
--- a/os/common/ports/ARMCMx/chcore.h
+++ b/os/common/ports/ARMCMx/chcore.h
@@ -135,7 +135,7 @@ struct port_intctx {};
* at context switch time.
*/
struct port_context {
- struct port_intctx *r13;
+ struct port_intctx *sp;
};
#endif /* !defined(_FROM_ASM_) */
diff --git a/os/common/ports/ARMCMx/chcore_v6m.h b/os/common/ports/ARMCMx/chcore_v6m.h
index 0ff3288b6..b4c6b2d01 100644
--- a/os/common/ports/ARMCMx/chcore_v6m.h
+++ b/os/common/ports/ARMCMx/chcore_v6m.h
@@ -207,11 +207,11 @@ struct port_intctx {
* by an @p port_intctx structure.
*/
#define PORT_SETUP_CONTEXT(tp, wbase, wtop, pf, arg) { \
- (tp)->ctx.r13 = (struct port_intctx *)((uint8_t *)(wtop) - \
- sizeof (struct port_intctx)); \
- (tp)->ctx.r13->r4 = (regarm_t)(pf); \
- (tp)->ctx.r13->r5 = (regarm_t)(arg); \
- (tp)->ctx.r13->lr = (regarm_t)_port_thread_start; \
+ (tp)->ctx.sp = (struct port_intctx *)((uint8_t *)(wtop) - \
+ sizeof (struct port_intctx)); \
+ (tp)->ctx.sp->r4 = (regarm_t)(pf); \
+ (tp)->ctx.sp->r5 = (regarm_t)(arg); \
+ (tp)->ctx.sp->lr = (regarm_t)_port_thread_start; \
}
/**
diff --git a/os/common/ports/ARMCMx/chcore_v7m.h b/os/common/ports/ARMCMx/chcore_v7m.h
index 3c0dfc4a1..e274ea1db 100644
--- a/os/common/ports/ARMCMx/chcore_v7m.h
+++ b/os/common/ports/ARMCMx/chcore_v7m.h
@@ -363,11 +363,11 @@ struct port_intctx {
* by an @p port_intctx structure.
*/
#define PORT_SETUP_CONTEXT(tp, wbase, wtop, pf, arg) { \
- (tp)->ctx.r13 = (struct port_intctx *)((uint8_t *)(wtop) - \
- sizeof (struct port_intctx)); \
- (tp)->ctx.r13->r4 = (regarm_t)(pf); \
- (tp)->ctx.r13->r5 = (regarm_t)(arg); \
- (tp)->ctx.r13->lr = (regarm_t)_port_thread_start; \
+ (tp)->ctx.sp = (struct port_intctx *)((uint8_t *)(wtop) - \
+ sizeof (struct port_intctx)); \
+ (tp)->ctx.sp->r4 = (regarm_t)(pf); \
+ (tp)->ctx.sp->r5 = (regarm_t)(arg); \
+ (tp)->ctx.sp->lr = (regarm_t)_port_thread_start; \
}
/**
diff --git a/os/rt/include/chschd.h b/os/rt/include/chschd.h
index a3db7a3db..8275a1eee 100644
--- a/os/rt/include/chschd.h
+++ b/os/rt/include/chschd.h
@@ -51,9 +51,8 @@
priority. */
#define IDLEPRIO (tprio_t)1 /**< @brief Idle priority. */
#define LOWPRIO (tprio_t)2 /**< @brief Lowest priority. */
-#define NORMALPRIO (tprio_t)64 /**< @brief Normal priority. */
-#define HIGHPRIO (tprio_t)127 /**< @brief Highest priority. */
-#define ABSPRIO (tprio_t)255 /**< @brief Greatest priority. */
+#define NORMALPRIO (tprio_t)128 /**< @brief Normal priority. */
+#define HIGHPRIO (tprio_t)255 /**< @brief Highest priority. */
/** @} */
/**
diff --git a/os/various/shell/shell_cmd.c b/os/various/shell/shell_cmd.c
index 6432f59d3..80d683583 100644
--- a/os/various/shell/shell_cmd.c
+++ b/os/various/shell/shell_cmd.c
@@ -148,7 +148,7 @@ static void cmd_threads(BaseSequentialStream *chp, int argc, char *argv[]) {
tp = chRegFirstThread();
do {
chprintf(chp, "%08lx %08lx %08lx %4lu %9s %12s\r\n",
- (uint32_t)tp->stklimit, (uint32_t)tp->ctx.r13, (uint32_t)tp,
+ (uint32_t)tp->stklimit, (uint32_t)tp->ctx.sp, (uint32_t)tp,
(uint32_t)tp->prio, states[tp->state],
tp->name == NULL ? "" : tp->name);
tp = chRegNextThread(tp);