aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--readme.txt9
-rw-r--r--src/chdebug.c2
-rw-r--r--src/chthreads.c2
-rw-r--r--src/include/threads.h3
4 files changed, 10 insertions, 6 deletions
diff --git a/readme.txt b/readme.txt
index 85e8baee1..c3828509a 100644
--- a/readme.txt
+++ b/readme.txt
@@ -85,6 +85,10 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process,
registers usage now the kernel is much smaller, faster and most OS APIs
use less RAM in stack frames (note, this is an ARM7 thumb mode specific
optimization).
+- CHANGE: Removed the field p_tid from the Thread structure and the related
+ code, this improved the thread creation scores (~2%) and saves some RAM,
+ the trace buffer field cse_tid is now populated with a simple hash of the
+ thread pointer.
- CHANGE: Renamed the macros chSysIRQEnter() and chSysIRQExit() in
CH_IRQ_PROLOGUE() and CH_IRQ_EPILOGUE() in order to make very clear that
those are not functions but inlined code. Also introduced a new macro
@@ -97,6 +101,11 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process,
documentation and updated, the wiki entries are obsolete and will be removed.
- New application notes and articles added.
+*** 1.0.1 ***
+- FIX: Modified the default value for the STM32 HSI setup it was 1, it should
+ be 0x10.
+- FIX: Removed an obsolete constant (P_SUSPENDED) from thread.h.
+
*** 1.0.0 ***
- License switch, added GPL exception, see exception.txt.
- Full test cycle and test reports updated.
diff --git a/src/chdebug.c b/src/chdebug.c
index 60bbf49ef..238071cc4 100644
--- a/src/chdebug.c
+++ b/src/chdebug.c
@@ -65,7 +65,7 @@ void chDbgTrace(Thread *otp, Thread *ntp) {
dbgtb.tb_ptr->cse_wtobjp = otp->p_wtobjp;
dbgtb.tb_ptr->cse_time = chSysGetTime();
dbgtb.tb_ptr->cse_state = otp->p_state;
- dbgtb.tb_ptr->cse_tid = ntp->p_tid;
+ dbgtb.tb_ptr->cse_tid = (unsigned)ntp >> 4;
if (++dbgtb.tb_ptr >= &dbgtb.tb_buffer[TRACE_BUFFER_SIZE])
dbgtb.tb_ptr = &dbgtb.tb_buffer[0];
}
diff --git a/src/chthreads.c b/src/chthreads.c
index 28d969e46..dc1a6f58c 100644
--- a/src/chthreads.c
+++ b/src/chthreads.c
@@ -28,9 +28,7 @@
* Initializes a thread structure.
*/
Thread *init_thread(Thread *tp, tprio_t prio) {
- static tid_t nextid = 0;
- tp->p_tid = nextid++;
tp->p_flags = P_MEM_MODE_STATIC;
tp->p_prio = prio;
tp->p_state = PRSUSPENDED;
diff --git a/src/include/threads.h b/src/include/threads.h
index 5877f49da..00f5e2714 100644
--- a/src/include/threads.h
+++ b/src/include/threads.h
@@ -43,8 +43,6 @@ struct Thread {
/** The thread priority.*/
tprio_t p_prio;
/* End of the fields shared with the ReadyList structure. */
- /** Thread identifier. */
- tid_t p_tid;
/** Current thread state.*/
tstate_t p_state;
/** Mode flags. */
@@ -156,7 +154,6 @@ struct Thread {
#define P_MEM_MODE_HEAP 1 /* Thread memory mode: heap. */
#define P_MEM_MODE_MEMPOOL 2 /* Thread memory mode: mempool. */
#define P_TERMINATE 4 /* Termination requested. */
-#define P_SUSPENDED 8 /* Create suspended (old). */
/* Not an API, don't use into the application code.*/
Thread *init_thread(Thread *tp, tprio_t prio);