C Microkernel Realtime eXecutive
Realtime Operating System for Cortex-M based microcontrollers
 
Loading...
Searching...
No Matches
cmrx.h
1#pragma once
2
17#include <stdint.h>
18#include <conf/kernel.h>
19#include <arch/sysenter.h>
20
21#ifdef CMRX_ARCH_SMP_SUPPORTED
22# define os_start(core) _os_start((core))
23#else
24# define os_start() _os_start(0)
25#endif
26
27// Declaring this as noreturn will break HIL tests
28extern void _os_start(uint8_t start_core);
29
46__SYSCALL long get_cpu_freq(void);
47
56__SYSCALL uint32_t getmicrotime(void);
57
80__SYSCALL uint32_t shutdown(void);
81
94uint32_t diff_microtime(uint32_t older_timestamp, uint32_t newer_timestamp);
95
__SYSCALL long get_cpu_freq(void)
Obtain the current CPU frequency.
Definition std.c:4
uint32_t diff_microtime(uint32_t older_timestamp, uint32_t newer_timestamp)
Calculate a distance of two timestamps Small helper function to calculate the time between two timest...
Definition std.c:21
__SYSCALL uint32_t getmicrotime(void)
Obtain the current scheduler time.
Definition std.c:10
__SYSCALL uint32_t shutdown(void)
Shutdown CMRX kernel.
Definition std.c:16
#define __SYSCALL
Mark function as syscall entrypoint in userspace.
Definition sysenter.h:14
void _os_start(uint8_t start_core)
Start up scheduler.
Definition sched.c:537