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]

Re: ecos questions:kill safty


Please always CC messages to the ecos-discuss list. This way others
may benefit from the discussion, and the messages will also be
archived for future readers.

zhlg_shuhan <zhlg_shuhan@sina.com> writes:

> Sir,thank your answer!
>    can I call  some functions just like sem::post() in my ISR/DSR?
> if I can,race condition may be occur! because these function(post() etc.)will access scheduler::queue,which is accessing by a thread interrupted by current ISR/DSR.
> right?

You cannot call any functions that interact with the kernel from an
ISR. Instead the ISR may ask for the DSR to be run, which can then
make the call. DSRs are only run when the scheduler is in a consistent
state and it is safe to make any further calls.

Several people have already answered this question for you on the
list. It is also covered extensively in the documentations. I suggest
you read it.

-- 
Nick Garnett - eCos Kernel Architect


-- 
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]