Revision 1573
svn is being wonky...
Changes to the scheduler, still doesn't work.
avr-gcc has its own convention for saving state
on entry and exit that's the same every time, so
I lean on this now to restore the context.
I think that it's very close,
my guess is that when new tasks are launched, RETI is
sending it somewhere random and it's causing a reset.
scheduler.h | ||
---|---|---|
12 | 12 |
#ifndef _SCHEDULER_H_ |
13 | 13 |
#define _SCHEDULER_H_ |
14 | 14 |
|
15 |
#define STACKSIZE 64
|
|
16 |
#define MAXTASKS 16
|
|
15 |
#define STACKSIZE 128
|
|
16 |
#define MAXTASKS 3
|
|
17 | 17 |
|
18 |
#define PRIORITY_LOWEST 8 |
|
19 |
|
|
20 | 18 |
#include <stdint.h> |
21 | 19 |
|
22 | 20 |
void scheduler_init(void); |
23 | 21 |
void yield(void); |
22 |
|
|
24 | 23 |
int register_task(void (*exec)(void), uint16_t period); |
25 | 24 |
|
25 |
unsigned int time_now(void); |
|
26 |
|
|
26 | 27 |
#endif |
Also available in: Unified diff