summaryrefslogtreecommitdiff
path: root/platforms/synchronization_util.h
diff options
context:
space:
mode:
authorStefan Kerkmann <karlk90@pm.me>2022-04-19 12:56:16 +0200
committerGitHub <noreply@github.com>2022-04-19 20:56:16 +1000
commit7712a286dccea029785976311433cf8673594f6f (patch)
tree775ae193b6fab345cce5e9046a3ff4116e83bc36 /platforms/synchronization_util.h
parent176ab1464964863637cc5d6a944dbdbe3f567aec (diff)
downloadqmk_firmware-7712a286dccea029785976311433cf8673594f6f.tar.gz
qmk_firmware-7712a286dccea029785976311433cf8673594f6f.zip
[Core] Use a mutex guard for split shared memory (#16647)
Diffstat (limited to 'platforms/synchronization_util.h')
-rw-r--r--platforms/synchronization_util.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/platforms/synchronization_util.h b/platforms/synchronization_util.h
new file mode 100644
index 0000000000..3730f271db
--- /dev/null
+++ b/platforms/synchronization_util.h
@@ -0,0 +1,14 @@
+// Copyright 2022 Stefan Kerkmann
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#if defined(PLATFORM_SUPPORTS_SYNCHRONIZATION)
+# if defined(SPLIT_KEYBOARD)
+void split_shared_memory_lock(void);
+void split_shared_memory_unlock(void);
+# endif
+#else
+inline void split_shared_memory_lock(void){};
+inline void split_shared_memory_unlock(void){};
+#endif