This is the mail archive of the ecos-patches@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: timer functions for non-kernel


>>>>> "Jani" == Jani Monoses <jani@iv.ro> writes:

    >> The driver API was meant to operate even in scenarios where
    >> interrupts are kept permanently disabled and all I/O happens
    >> via polling, e.g. RedBoot. It reduces the effort needed inside
    >> device drivers to cope

    Jani> these functions just like the others in drv_api are part of
    Jani> an optional API. cyg_drv_interrupt , cond_vars , mutexes etc
    Jani> imply interrupts don't they? what are the disadvantages of
    Jani> adding these functions? Redboot does not use them so it
    Jani> cannot be affected.

It is not RedBoot itself, it is device drivers (especially ethernet
drivers) that may be used by either RedBoot or by an eCos application
- hence the term driver API. The various functions in the current
driver API will do the right thing irrespective of whether the system
is running with interrupts enabled or disabled. Your proposed timer
functions will only work correctly if the system is running with
interrupts enabled, otherwise your cyg_current_time() would return
misleading data and your cyg_thread_delay() will block forever. The
distinction seems pretty clear to me.

Bart

-- 
Bart Veer                       eCos Configuration Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts


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