fix(ble_mesh): Miscellaneous bugfixes according to our internal bug report (v2)

This commit is contained in:
luoxu
2026-06-04 16:45:36 +08:00
committed by Liu Linyan
parent 424a685692
commit 6b8ddc66f8
81 changed files with 1297 additions and 793 deletions
@@ -168,7 +168,7 @@ extern bt_mesh_atomic_val_t bt_mesh_atomic_and(bt_mesh_atomic_t *target, bt_mesh
#ifdef CONFIG_ATOMIC_OPERATIONS_BUILTIN
static inline bool bt_mesh_atomic_cas(bt_mesh_atomic_t *target, bt_mesh_atomic_val_t excepted, bt_mesh_atomic_val_t new_val)
{
return __atomic_compare_exchange_n(target, &excepted, &new_val, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
return __atomic_compare_exchange_n(target, &excepted, new_val, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
}
#else
extern bool bt_mesh_atomic_cas(bt_mesh_atomic_t *target, bt_mesh_atomic_val_t excepted, bt_mesh_atomic_val_t new_val);
@@ -50,7 +50,9 @@ void bt_mesh_atomic_lock(void);
void bt_mesh_atomic_unlock(void);
void bt_mesh_mutex_init(void);
#if CONFIG_BLE_MESH_DEINIT
void bt_mesh_mutex_deinit(void);
#endif /* CONFIG_BLE_MESH_DEINIT */
#ifdef __cplusplus
}
@@ -41,6 +41,13 @@ extern "C" {
#define INT_TO_POINTER(x) ((void *) (x))
#endif
#ifndef ESP_ASSUME_NONNULL
/**
* @brief Assume pointer parameters are non-null unless explicitly marked otherwise.
*/
#define ESP_ASSUME_NONNULL(ptr)
#endif
/* Evaluates to 0 if cond is true-ish; compile error otherwise */
#ifndef ZERO_OR_COMPILE_ERROR
#define ZERO_OR_COMPILE_ERROR(cond) ((int) sizeof(char[1 - 2 * !(cond)]) - 1)