[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why _ThreadProcessSignalsFromIrq() in new exception processing?



Joel Sherrill wrote:
> Many ports actually have a label "_ISR_Thread_Dispatch" which is
> the point to which _ISR_Handler returns when a onctext switch or signal
> evaluation is needed.  The typical implementaiton of that pushes some 
> registers, calls _Thread_Dispatch, pops them and returns.  This way
> there is a simple, single patch out of the ISR for all cases requiring
> OS evaluation.

But, comming back to the push of a thread context and the performance I 
think :
	1) The path to switch should be as fast as possible and should not 
require pushing any other registers than the C scratch registers (+ some 
unavaoidable one). This path is critical for all wakeup from ISR 
primitives (mtext/sem V, eventPost, ...,
	2) The path for software exception is not critical from a performance 
point of view and having a context realy helps in a lot of situation,

Therefore having two path is maybe more complex but may lead to more 
efficient code...

-- 
    __
   /  `                   	Eric Valette
  /--   __  o _.          	6 rue Paul Le Flem
(___, / (_(_(__         	35740 Pace

Tel: +33 (0)2 99 85 26 76	Fax: +33 (0)2 99 85 26 76
E-mail: eric.valette at free.fr