From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16575 invoked by alias); 17 Sep 2003 14:49:03 -0000 Mailing-List: contact ecos-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@sources.redhat.com Received: (qmail 16567 invoked from network); 17 Sep 2003 14:49:02 -0000 Received: from unknown (HELO corb.mc.mpls.visi.com) (208.42.156.1) by sources.redhat.com with SMTP; 17 Sep 2003 14:49:02 -0000 Received: from grante.comtrol.com (isis.visi.com [209.98.98.8]) by corb.mc.mpls.visi.com (Postfix) with SMTP id 3C6F981ED for ; Wed, 17 Sep 2003 09:49:02 -0500 (CDT) Received: (qmail 20256 invoked by uid 500); 17 Sep 2003 14:48:24 -0000 Date: Wed, 17 Sep 2003 14:49:00 -0000 From: Grant Edwards To: ecos-discuss@sources.redhat.com Message-ID: <20030917094809.A20187@visi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Subject: [ECOS] How to know if scheduler has started? X-SW-Source: 2003-09/txt/msg00303.txt.bz2 How does driver or application code know if the scheduler has been started? I've been asked that by several customers who need to be able to write functions that can be called from either the cyg_user_start() context or from a thread contex, and I've never been able to come up with an answer. It looks like (Scheduler::current_thread != NULL) may be one way in older versions of eCos -- but I can't find the equivalent in 2.0 code. Anyway, I was hoping there'd be something kapi.h that could be called. Can cyg_thread_self() be used to determine if the scheduler has been started? I've been looking at the eCos sources, but haven't been able to figure out how cyg_thread_self() works, since I can't find the implimentation of the self() method for Cyg_Thread. Where is it? -- Grant Edwards grante@visi.com -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss