aversive_10-03-12/modules/base/scheduler/scheduler_interrupt.c File Reference

#include <stdlib.h>
#include <aversive.h>
#include <scheduler_config.h>
#include <scheduler_private.h>

Go to the source code of this file.

Functions

uint8_t scheduler_disable_save (void)
void scheduler_enable_restore (uint8_t old_prio)
void scheduler_interrupt (void)


Function Documentation

uint8_t scheduler_disable_save ( void   ) 

Temporarily disable scheduler events. You may loose precision in events schedule. It returns the current priority of the scheduler.

Definition at line 34 of file scheduler_interrupt.c.

Referenced by AX12_send().

void scheduler_enable_restore ( uint8_t  old_prio  ) 

Re-enable scheduler after a call to scheduler_disable_save().

Definition at line 42 of file scheduler_interrupt.c.

Referenced by AX12_send().

void scheduler_interrupt ( void   ) 

this function is called from a timer interruption. If an event has to be scheduled, it will execute the fonction (IRQ are allowed during the execution of the function). This interruption can be interrupted by itself too, in this case only events with a higher priority can be scheduled.

We assume that this function is called from a SIGNAL(), with global interrupt flag disabled --> that's why we can use cli() and sei() instead of IRQ_LOCK(flags).

Definition at line 59 of file scheduler_interrupt.c.

References cli, event_t::current_time, event_t::data, DUMP_EVENTS, event_t::f, g_tab_event, i, event_t::period, event_t::priority, SCHEDULER_EVENT_ACTIVE, SCHEDULER_EVENT_DELETING, SCHEDULER_EVENT_FREE, SCHEDULER_EVENT_SCHEDULED, sei, SLIST_FIRST, SLIST_FOREACH, SLIST_HEAD, SLIST_INIT, SLIST_INSERT_AFTER, SLIST_INSERT_HEAD, SLIST_NEXT, and event_t::state.


Generated on Fri Mar 12 06:32:05 2010 for AVR by  doxygen 1.5.6