diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-02-01 10:07:13 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-02-01 10:07:13 +0000 |
commit | 155dd60be003a920796d5af147204b28caf9f576 (patch) | |
tree | b876634891cc1a09c9546fd505a34d5d0b960a9b /src | |
parent | fd3e840247b14247ef8c361ec68e0d99a8f7ec9a (diff) | |
download | ChibiOS-155dd60be003a920796d5af147204b28caf9f576.tar.gz ChibiOS-155dd60be003a920796d5af147204b28caf9f576.tar.bz2 ChibiOS-155dd60be003a920796d5af147204b28caf9f576.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@705 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src')
-rw-r--r-- | src/chdebug.c | 2 | ||||
-rw-r--r-- | src/chthreads.c | 2 | ||||
-rw-r--r-- | src/include/threads.h | 3 |
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); |