From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3468 invoked by alias); 19 Apr 2007 15:08:02 -0000 Received: (qmail 3290 invoked by uid 22791); 19 Apr 2007 15:08:00 -0000 X-Spam-Check-By: sourceware.org Received: from 204-133-123-27.dia.static.slbbi.com (HELO mail.chez-thomas.org) (204.133.123.27) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 19 Apr 2007 16:07:57 +0100 Received: by mail.chez-thomas.org (Postfix, from userid 999) id 470DB19500DE; Thu, 19 Apr 2007 09:07:56 -0600 (MDT) Received: from [192.168.1.101] (hermes_local [192.168.1.101]) by mail.chez-thomas.org (Postfix) with ESMTP id 58F821950090; Thu, 19 Apr 2007 09:07:53 -0600 (MDT) Message-ID: <462785C8.9090505@mlbassoc.com> Date: Thu, 19 Apr 2007 15:08:00 -0000 From: Gary Thomas User-Agent: Thunderbird 1.5.0.10 (X11/20070301) MIME-Version: 1.0 To: redheart CC: ecos-discuss@ecos.sourceware.org References: <10079093.post@talk.nabble.com> In-Reply-To: <10079093.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Re: [ECOS] I call cyg_mbox_get in DSR, System corrupt. X-SW-Source: 2007-04/txt/msg00086.txt.bz2 redheart wrote: > I firstly called cyg_mbox_get in DSR, and block certain thread > then i called cyg_mbox_put in another thread, > then the scheduler attempt to wake up the blocked thread > but at the time of switching context, the system corrupt. > > the debugger show that "previus frame inner to this frame (corrupt stack?)" > I know that call blockable function in a DSR is illegal. > but i don'r know what resulted in the corrupt. > > why? > Because this is an unsafe operation and "not allowed" to be called from a DSR. DSRs cannot call any kernel function which might block (because they are run anonymously, not in any particular thread context). -- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------ -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss