|
|
@@ -1,11 +1,12 @@
|
|
|
/*
|
|
|
- * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
|
|
+ * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
|
|
*
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
*/
|
|
|
#pragma once
|
|
|
|
|
|
#include_next <sys/lock.h>
|
|
|
+#include "sdkconfig.h"
|
|
|
|
|
|
#ifdef _RETARGETABLE_LOCKING
|
|
|
|
|
|
@@ -13,15 +14,19 @@
|
|
|
* The size here should be sufficient for a FreeRTOS mutex.
|
|
|
* This is checked by a static assertion in locks.c
|
|
|
*
|
|
|
- * Note 1: this might need to be made dependent on whether FreeRTOS
|
|
|
+ * Note: this might need to be made dependent on whether FreeRTOS
|
|
|
* is included in the build.
|
|
|
- *
|
|
|
- * Note 2: the size is made sufficient for the case when
|
|
|
- * configUSE_TRACE_FACILITY is enabled. If it is disabled,
|
|
|
- * this definition wastes 8 bytes.
|
|
|
*/
|
|
|
struct __lock {
|
|
|
+#if (CONFIG_FREERTOS_USE_LIST_DATA_INTEGRITY_CHECK_BYTES && CONFIG_FREERTOS_USE_TRACE_FACILITY)
|
|
|
+ int reserved[29];
|
|
|
+#elif (CONFIG_FREERTOS_USE_LIST_DATA_INTEGRITY_CHECK_BYTES && !CONFIG_FREERTOS_USE_TRACE_FACILITY)
|
|
|
+ int reserved[27];
|
|
|
+#elif (!CONFIG_FREERTOS_USE_LIST_DATA_INTEGRITY_CHECK_BYTES && CONFIG_FREERTOS_USE_TRACE_FACILITY)
|
|
|
int reserved[23];
|
|
|
+#else
|
|
|
+ int reserved[21];
|
|
|
+#endif /* #if (CONFIG_FREERTOS_USE_LIST_DATA_INTEGRITY_CHECK_BYTES && CONFIG_FREERTOS_USE_TRACE_FACILITY) */
|
|
|
};
|
|
|
|
|
|
/* Compatibility definitions for the legacy ESP-specific locking implementation.
|