aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/chdebug.c2
-rw-r--r--src/chthreads.c2
-rw-r--r--src/include/threads.h3
3 files changed, 1 insertions, 6 deletions
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);