From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15804 invoked by alias); 2 Nov 2013 16:26:01 -0000 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 Received: (qmail 15791 invoked by uid 89); 2 Nov 2013 16:26:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: plane.gmane.org Received: from plane.gmane.org (HELO plane.gmane.org) (80.91.229.3) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Sat, 02 Nov 2013 16:25:59 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Vce1I-0008Eu-UR for ecos-discuss@ecos.sourceware.org; Sat, 02 Nov 2013 17:25:52 +0100 Received: from c-24-118-110-103.hsd1.mn.comcast.net ([24.118.110.103]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 02 Nov 2013 17:25:52 +0100 Received: from grant.b.edwards by c-24-118-110-103.hsd1.mn.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 02 Nov 2013 17:25:52 +0100 To: ecos-discuss@ecos.sourceware.org From: Grant Edwards Date: Sat, 02 Nov 2013 16:26:00 -0000 Message-ID: References: <5273DF08.2000708@calivar.com> User-Agent: slrn/1.0.1 (Linux) X-IsSubscribed: yes Subject: [ECOS] Re: How to know if scheduler has started? X-SW-Source: 2013-11/txt/msg00011.txt.bz2 On 2013-11-01, Nick Garnett wrote: > >> OTOH, are you are allowed to lock/unlock mutexes from initialization >> code? Maybe I'm misremembering, but I thought that was forbidden? > > You are allowed to lock/unlock a mutex during initialization. That is > why the idle thread is set current throughout the init code, and why the > trick you mention above will work. Except the trick I mentioned above does _not_ work when called from device driver intialization code. I haven't tracked down which of the two calls fails in that case, but one of them causes a segfault when called from driver init code (but works fine when called from cyg_user_start()). -- Grant -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss