This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Make signalling routines ISR-safe?
- From: Heiko Panther <heiko dot panther at web dot de>
- To: ecos-discuss at ecos dot sourceware dot org
- Date: Thu, 29 Apr 2004 10:41:23 +0200
- Subject: [ECOS] 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