From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30242 invoked by alias); 11 Jun 2005 13:22:44 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 30235 invoked by uid 22791); 11 Jun 2005 13:22:37 -0000 Received: from norbert.ecoscentric.com (HELO smtp.ecoscentric.com) (194.153.168.165) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sat, 11 Jun 2005 13:22:37 +0000 Received: by smtp.ecoscentric.com (Postfix, from userid 99) id 675DF65C07D; Sat, 11 Jun 2005 14:22:35 +0100 (BST) Received: from delenn.bartv.net (localhost [127.0.0.1]) by smtp.ecoscentric.com (Postfix) with ESMTP id 6AF8765C057; Sat, 11 Jun 2005 14:22:34 +0100 (BST) To: fabian.scheler@gmail.com Cc: ecos-discuss@ecos.sourceware.org In-reply-to: <69dd805e050610140534b5250c@mail.gmail.com> (message from Fabian Scheler on Fri, 10 Jun 2005 23:05:43 +0200) From: Bart Veer References: <69dd805e050610140534b5250c@mail.gmail.com> Message-Id: <20050611132234.6AF8765C057@smtp.ecoscentric.com> Date: Sat, 11 Jun 2005 13:22:00 -0000 Subject: Re: [ECOS] Dangerous method: Cyg_SchedulerImplementation::set_idle_thread(Cyg_Thread* thread)? X-SW-Source: 2005-06/txt/msg00079.txt.bz2 >>>>> "Fabian" == Fabian Scheler writes: Fabian> maybe I've just not read carefully enough through the Fabian> source code of eCos, but two methods appear a bit Fabian> hazardous to me. These are the implementations of the Fabian> method Fabian> Cyg_SchedulerImplementation::set_idle_thread(Cyg_Thread* thread) Fabian> within the Multi-Level-Queue- and the Bitmap-Scheduler. In Fabian> both cases these methods set the current thread to the Fabian> thread given as parameter, at least for single processor Fabian> systems, but this assumption only holds at system startup Fabian> in general when no other thread is running. Moreover these Fabian> methods are public, so the user can change the current Fabian> idle thread during runtime, and thus, mess up the pointer Fabian> to the current thread. This function is not part of the exported API: there is no C equivalent in kapi.h, nor is there any documentation. It is intended only for use within the kernel, and only gets used during system initialization. Bart -- Bart Veer eCos Configuration Architect http://www.ecoscentric.com/ The eCos and RedBoot experts -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss