This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Dangerous method: Cyg_SchedulerImplementation::set_idle_thread(Cyg_Thread* thread)?


>>>>> "Fabian" == Fabian Scheler <fabian.scheler@gmail.com> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]