18 lines
409 B
C
18 lines
409 B
C
#ifndef RTOS_H
|
|
#define RTOS_H
|
|
|
|
#include <stdint.h>
|
|
|
|
typedef struct PeriodicEvent {
|
|
void (*event)(void);
|
|
uint32_t period_ms;
|
|
} PeriodicEvent_t;
|
|
|
|
void RoundRobinInit(void);
|
|
void AddThreads(void (**threads)(void));
|
|
void AddPeriodicEventThreads(PeriodicEvent_t *periodic_events);
|
|
void RoundRobinLaunch(uint32_t time_slice_cycles);
|
|
void Wait(int32_t *sema_pt);
|
|
void Signal(int32_t *sema_pt);
|
|
|
|
#endif /* RTOS_H */ |