From 7712a286dccea029785976311433cf8673594f6f Mon Sep 17 00:00:00 2001 From: Stefan Kerkmann Date: Tue, 19 Apr 2022 12:56:16 +0200 Subject: [Core] Use a mutex guard for split shared memory (#16647) --- platforms/synchronization_util.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 platforms/synchronization_util.h (limited to 'platforms/synchronization_util.h') 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 -- cgit v1.2.1