public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Scheduler locking and DSR context
@ 2007-05-16 20:51 Paul D. DeRocco
  0 siblings, 0 replies; only message in thread
From: Paul D. DeRocco @ 2007-05-16 20:51 UTC (permalink / raw)
  To: eCos Discuss

I'm perusing the eCos Reference Manual, (c) 2005, from eCosCentric. On p31,
near the end of the "Calling Contexts" section, it says:

"... threads can switch temporarily to DSR context by locking the scheduler.
Only certain kernel functions can be called from DSR context, although more
than in ISR context. In particular it is possible to use any synchronization
primitives which cannot block. These include cyg_semaphore_post,
cyg_cond_signal, cyg_cond_broadcast, cyg_flag_setbits, and cyg_mbox_tryput.
It is not possible to use any primitives that may block such as
cyg_semaphore_wait, cyg_mutex_lock, or cyg_mbox_put. Calling such functions
from inside a DSR may cause the system to hang."

As was recently mentioned here, each thread now has its own scheduler lock
count, and it is entirely routine for a thread to lock the scheduler inside
a device driver, and then call something like cyg_cond_wait to go to sleep.
It would seem to me, then, that locking the scheduler ISN'T the moral
equivalent of switching to DSR context. Is this just a bit of documentation
cruft from before threads were given separate lock counts? Or is there
something I'm missing?
 
-- 

Ciao,               Paul D. DeRocco
Paul                mailto:pderocco@ix.netcom.com 


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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-05-16 20:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-16 20:51 [ECOS] Scheduler locking and DSR context Paul D. DeRocco

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).