ble_mesh: stack: Make some internal static functions inline

This commit is contained in:
lly
2020-10-16 11:50:39 +08:00
committed by bot
parent b0f5e4b4ee
commit d13e0635a8
20 changed files with 89 additions and 87 deletions

View File

@@ -356,7 +356,7 @@ int bt_mesh_client_send_msg(bt_mesh_client_common_param_t *param,
static bt_mesh_mutex_t client_model_lock;
static void bt_mesh_client_model_mutex_new(void)
static inline void bt_mesh_client_model_mutex_new(void)
{
if (!client_model_lock.mutex) {
bt_mesh_mutex_create(&client_model_lock);
@@ -364,7 +364,7 @@ static void bt_mesh_client_model_mutex_new(void)
}
#if CONFIG_BLE_MESH_DEINIT
static void bt_mesh_client_model_mutex_free(void)
static inline void bt_mesh_client_model_mutex_free(void)
{
bt_mesh_mutex_free(&client_model_lock);
}

View File

@@ -111,7 +111,7 @@ static const bt_mesh_client_op_pair_t gen_op_pair[] = {
static bt_mesh_mutex_t generic_client_lock;
static void bt_mesh_generic_client_mutex_new(void)
static inline void bt_mesh_generic_client_mutex_new(void)
{
if (!generic_client_lock.mutex) {
bt_mesh_mutex_create(&generic_client_lock);
@@ -119,18 +119,18 @@ static void bt_mesh_generic_client_mutex_new(void)
}
#if CONFIG_BLE_MESH_DEINIT
static void bt_mesh_generic_client_mutex_free(void)
static inline void bt_mesh_generic_client_mutex_free(void)
{
bt_mesh_mutex_free(&generic_client_lock);
}
#endif /* CONFIG_BLE_MESH_DEINIT */
static void bt_mesh_generic_client_lock(void)
static inline void bt_mesh_generic_client_lock(void)
{
bt_mesh_mutex_lock(&generic_client_lock);
}
static void bt_mesh_generic_client_unlock(void)
static inline void bt_mesh_generic_client_unlock(void)
{
bt_mesh_mutex_unlock(&generic_client_lock);
}

View File

@@ -49,7 +49,7 @@ static const bt_mesh_client_op_pair_t sensor_op_pair[] = {
static bt_mesh_mutex_t sensor_client_lock;
static void bt_mesh_sensor_client_mutex_new(void)
static inline void bt_mesh_sensor_client_mutex_new(void)
{
if (!sensor_client_lock.mutex) {
bt_mesh_mutex_create(&sensor_client_lock);
@@ -57,18 +57,18 @@ static void bt_mesh_sensor_client_mutex_new(void)
}
#if CONFIG_BLE_MESH_DEINIT
static void bt_mesh_sensor_client_mutex_free(void)
static inline void bt_mesh_sensor_client_mutex_free(void)
{
bt_mesh_mutex_free(&sensor_client_lock);
}
#endif /* CONFIG_BLE_MESH_DEINIT */
static void bt_mesh_sensor_client_lock(void)
static inline void bt_mesh_sensor_client_lock(void)
{
bt_mesh_mutex_lock(&sensor_client_lock);
}
static void bt_mesh_sensor_client_unlock(void)
static inline void bt_mesh_sensor_client_unlock(void)
{
bt_mesh_mutex_unlock(&sensor_client_lock);
}

View File

@@ -65,7 +65,7 @@ static const bt_mesh_client_op_pair_t time_scene_op_pair[] = {
static bt_mesh_mutex_t time_scene_client_lock;
static void bt_mesh_time_scene_client_mutex_new(void)
static inline void bt_mesh_time_scene_client_mutex_new(void)
{
if (!time_scene_client_lock.mutex) {
bt_mesh_mutex_create(&time_scene_client_lock);
@@ -73,18 +73,18 @@ static void bt_mesh_time_scene_client_mutex_new(void)
}
#if CONFIG_BLE_MESH_DEINIT
static void bt_mesh_time_scene_client_mutex_free(void)
static inline void bt_mesh_time_scene_client_mutex_free(void)
{
bt_mesh_mutex_free(&time_scene_client_lock);
}
#endif /* CONFIG_BLE_MESH_DEINIT */
static void bt_mesh_time_scene_client_lock(void)
static inline void bt_mesh_time_scene_client_lock(void)
{
bt_mesh_mutex_lock(&time_scene_client_lock);
}
static void bt_mesh_time_scene_client_unlock(void)
static inline void bt_mesh_time_scene_client_unlock(void)
{
bt_mesh_mutex_unlock(&time_scene_client_lock);
}