From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5453 invoked by alias); 16 May 2007 20:50:17 -0000 Received: (qmail 5323 invoked by uid 22791); 16 May 2007 20:50:15 -0000 X-Spam-Check-By: sourceware.org Received: from elasmtp-mealy.atl.sa.earthlink.net (HELO elasmtp-mealy.atl.sa.earthlink.net) (209.86.89.69) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 16 May 2007 20:50:07 +0000 Received: from [76.167.219.232] (helo=PAULD) by elasmtp-mealy.atl.sa.earthlink.net with asmtp (Exim 4.34) id 1HoQRe-0004KQ-Db for ecos-discuss@ecos.sourceware.org; Wed, 16 May 2007 16:50:02 -0400 From: "Paul D. DeRocco" To: "eCos Discuss" Date: Wed, 16 May 2007 20:51:00 -0000 Message-ID: <008001c797fb$c507d9c0$887ba8c0@PAULD> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook, Build 10.0.6822 X-ELNK-Trace: bd7d5d4e6f8f652c74cfc7ce3b1ad11381c87f5e51960688ec5c4694d35f6d31530208dfe5f6eabd350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: [ECOS] Scheduler locking and DSR context X-SW-Source: 2007-05/txt/msg00086.txt.bz2 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? =20 --=20 Ciao, Paul D. DeRocco Paul mailto:pderocco@ix.netcom.com=20 -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss