This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

interrupt_end( ) compilation question.


Hi:
    I got a question about the interrupt_end( ):
when a thread is switched to another thread due to the interrupt happens as
following:
thread1 executes --> interrupt happens --> interrupt handler -->
interrupt_end( ) --> HAL_THREAD_SWITCH_CONTEXT --> thread 2 executes.
will it be possible that inside interrupt_end( ) function it use any
register(after compiled to assembly code), if so will the execution
context(thread1's) be lost?

for example:
thread1:
(1).	mov r1,0
(2).	mov r2,1
(3).	add r1,r2

if interrupt happens before line (2) , after line (1)[r1 already been set to
0], then whether when compiling interrupt_end( ) functioin r1 register will
be used inside interrupt_end( ) or not? if so r1 = 0 previously will be
lost, because HAL_THREAD_SWITCH_CONTEXT is executed inside interrupt_end is
called.

Thanks a lot.

Best regards



-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]