Taltech_embedded/common/rtos.h

19 lines
435 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 Sleep(int32_t time);
void Wait(int32_t *sema_pt);
void Signal(int32_t *sema_pt);
#endif /* RTOS_H */