summaryrefslogtreecommitdiff
path: root/supervisor/supervisor.mk
diff options
context:
space:
mode:
authorJeff Epler <jepler@gmail.com>2019-11-18 08:22:41 -0600
committerJeff Epler <jepler@gmail.com>2019-11-18 11:01:23 -0600
commit7f744a2369a5036cadfa05575da1704f709c98bb (patch)
tree62b0c1d21d75910076a6c4b8d11a0c55861267aa /supervisor/supervisor.mk
parent45d1b290ee13ee4080e9718909c33053583314b8 (diff)
Supervisor: move most of systick to the supervisor
This code is shared by most parts, except where not all the #ifdefs inside the tick function were present in all ports. This mostly would have broken gamepad tick support on non-samd ports. The "ms32" and "ms64" variants of the tick functions are introduced because there is no 64-bit atomic read. Disabling interrupts avoids a low probability bug where milliseconds could be off by ~49.5 days once every ~49.5 days (2^32 ms). Avoiding disabling interrupts when only the low 32 bits are needed is a minor optimization. Testing performed: on metro m4 express, USB still works and time.monotonic_ns() still counts up
Diffstat (limited to 'supervisor/supervisor.mk')
-rw-r--r--supervisor/supervisor.mk1
1 files changed, 1 insertions, 0 deletions
diff --git a/supervisor/supervisor.mk b/supervisor/supervisor.mk
index b2e4eb1dc..5e997ee78 100644
--- a/supervisor/supervisor.mk
+++ b/supervisor/supervisor.mk
@@ -10,6 +10,7 @@ SRC_SUPERVISOR = \
supervisor/shared/safe_mode.c \
supervisor/shared/stack.c \
supervisor/shared/status_leds.c \
+ supervisor/shared/tick.c \
supervisor/shared/translate.c
ifndef $(NO_USB)