git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@705 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2009-02-01 10:07:13 +00:00
parent fd3e840247
commit 155dd60be0
4 changed files with 10 additions and 6 deletions

View File

@ -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.

View File

@ -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];
}

View File

@ -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;

View File

@ -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);