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]

Make signalling routines ISR-safe?


One thing that became more and more annoying to me in recent time is that you have to call routines that can trigger a rescheduling (like cyg_semaphore_post) from DSR context. This is all nice when you got a small system and you can easily track what's happened in the ISR.

Since I have compatibility layers on top of eCos kernel, to provide an OS abstraction for other software librarys, it's not that easy for me. For example, I have to keep all semaphores that need posting in a linked list to post them later. Plus, some semaphores need to be posted from ISR/DSC context as well as from thread context. So I have to have a global telling me what context I'm in, because I don't want to wait for DSR when I'm in thread context. All said, it's rather painful.

What I was wondering about: What were your considerations to not make these routines ISR-safe? One thing I see might be a smaller interrupt latency because only the scheduler is locked, but not the interrupts. Also it saves some cycles to not invoke the scheduler every interrupt.

Still, I would definitely be interested in (optional) ISR-safety of these routines, and could accept other tradeoffs.

Heiko

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


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