From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21252 invoked by alias); 10 Jun 2005 21:05:48 -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 21232 invoked by uid 22791); 10 Jun 2005 21:05:46 -0000 Received: from nproxy.gmail.com (HELO nproxy.gmail.com) (64.233.182.196) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 10 Jun 2005 21:05:46 +0000 Received: by nproxy.gmail.com with SMTP id i2so42957nfe for ; Fri, 10 Jun 2005 14:05:43 -0700 (PDT) Received: by 10.48.250.12 with SMTP id x12mr39298nfh; Fri, 10 Jun 2005 14:05:43 -0700 (PDT) Received: by 10.48.43.13 with HTTP; Fri, 10 Jun 2005 14:05:43 -0700 (PDT) Message-ID: <69dd805e050610140534b5250c@mail.gmail.com> Date: Fri, 10 Jun 2005 21:05:00 -0000 From: Fabian Scheler Reply-To: Fabian Scheler To: ecos-discuss@ecos.sourceware.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: [ECOS] Dangerous method: Cyg_SchedulerImplementation::set_idle_thread(Cyg_Thread* thread)? X-SW-Source: 2005-06/txt/msg00077.txt.bz2 Hello, maybe I've just not read carefully enough through the source code of eCos, but two methods appear a bit hazardous to me. These are the implementations of the method Cyg_SchedulerImplementation::set_idle_thread(Cyg_Thread* thread) within the Multi-Level-Queue- and the Bitmap-Scheduler. In both cases these methods set the current thread to the thread given as parameter, at least for single processor systems, but this assumption only holds at system startup in general when no other thread is running. Moreover these methods are public, so the user can change the current idle thread during runtime, and thus, mess up the pointer to the current thread. Ciao, Fabian -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss