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

@ -717,7 +717,7 @@ static inline void net_buf_simple_save(struct net_buf_simple *buf,
* @param state Stored state.
*/
static inline void net_buf_simple_restore(struct net_buf_simple *buf,
struct net_buf_simple_state *state)
struct net_buf_simple_state *state)
{
buf->data = buf->__buf + state->offset;
buf->len = state->len;
@ -963,7 +963,7 @@ int net_buf_id(struct net_buf *buf);
*/
#if defined(CONFIG_BLE_MESH_NET_BUF_LOG)
struct net_buf *net_buf_alloc_fixed_debug(struct net_buf_pool *pool, s32_t timeout,
const char *func, int line);
const char *func, int line);
#define net_buf_alloc_fixed(_pool, _timeout) \
net_buf_alloc_fixed_debug(_pool, _timeout, __func__, __LINE__)
#else
@ -1631,8 +1631,8 @@ struct net_buf *net_buf_frag_add(struct net_buf *head, struct net_buf *frag);
*/
#if defined(CONFIG_BLE_MESH_NET_BUF_LOG)
struct net_buf *net_buf_frag_del_debug(struct net_buf *parent,
struct net_buf *frag,
const char *func, int line);
struct net_buf *frag,
const char *func, int line);
#define net_buf_frag_del(_parent, _frag) \
net_buf_frag_del_debug(_parent, _frag, __func__, __LINE__)
#else
@ -1655,7 +1655,7 @@ struct net_buf *net_buf_frag_del(struct net_buf *parent, struct net_buf *frag);
* @return number of bytes actually copied
*/
size_t net_buf_linearize(void *dst, size_t dst_len,
struct net_buf *src, size_t offset, size_t len);
struct net_buf *src, size_t offset, size_t len);
/**
* @typedef net_buf_allocator_cb
@ -1694,8 +1694,8 @@ typedef struct net_buf *(*net_buf_allocator_cb)(s32_t timeout, void *user_data);
* were no free fragments in a pool to accommodate all data.
*/
size_t net_buf_append_bytes(struct net_buf *buf, size_t len,
const void *value, s32_t timeout,
net_buf_allocator_cb allocate_cb, void *user_data);
const void *value, s32_t timeout,
net_buf_allocator_cb allocate_cb, void *user_data);
/**
* @brief Skip N number of bytes in a net_buf

View File

@ -291,7 +291,7 @@ static inline sys_dnode_t *sys_dlist_peek_head_not_empty(sys_dlist_t *list)
*/
static inline sys_dnode_t *sys_dlist_peek_next_no_check(sys_dlist_t *list,
sys_dnode_t *node)
sys_dnode_t *node)
{
return (node == list->tail) ? NULL : node->next;
}
@ -307,7 +307,7 @@ static inline sys_dnode_t *sys_dlist_peek_next_no_check(sys_dlist_t *list,
*/
static inline sys_dnode_t *sys_dlist_peek_next(sys_dlist_t *list,
sys_dnode_t *node)
sys_dnode_t *node)
{
return node ? sys_dlist_peek_next_no_check(list, node) : NULL;
}
@ -379,7 +379,8 @@ static inline void sys_dlist_prepend(sys_dlist_t *list, sys_dnode_t *node)
*/
static inline void sys_dlist_insert_after(sys_dlist_t *list,
sys_dnode_t *insert_point, sys_dnode_t *node)
sys_dnode_t *insert_point,
sys_dnode_t *node)
{
if (!insert_point) {
sys_dlist_prepend(list, node);
@ -405,7 +406,8 @@ static inline void sys_dlist_insert_after(sys_dlist_t *list,
*/
static inline void sys_dlist_insert_before(sys_dlist_t *list,
sys_dnode_t *insert_point, sys_dnode_t *node)
sys_dnode_t *insert_point,
sys_dnode_t *node)
{
if (!insert_point) {
sys_dlist_append(list, node);

View File

@ -312,7 +312,7 @@ static inline void sys_slist_append(sys_slist_t *list,
* @param tail A pointer to the last element of the list to append
*/
static inline void sys_slist_append_list(sys_slist_t *list,
void *head, void *tail)
void *head, void *tail)
{
if (!list->tail) {
list->head = (sys_snode_t *)head;
@ -333,7 +333,7 @@ static inline void sys_slist_append_list(sys_slist_t *list,
* @param list_to_append A pointer to the list to append.
*/
static inline void sys_slist_merge_slist(sys_slist_t *list,
sys_slist_t *list_to_append)
sys_slist_t *list_to_append)
{
sys_slist_append_list(list, list_to_append->head,
list_to_append->tail);
@ -443,7 +443,7 @@ static inline void sys_slist_remove(sys_slist_t *list,
* @return true if node was removed
*/
static inline bool sys_slist_find_and_remove(sys_slist_t *list,
sys_snode_t *node)
sys_snode_t *node)
{
sys_snode_t *prev = NULL;
sys_snode_t *test;

View File

@ -16,7 +16,7 @@ int net_buf_id(struct net_buf *buf)
}
static inline struct net_buf *pool_get_uninit(struct net_buf_pool *pool,
u16_t uninit_count)
u16_t uninit_count)
{
struct net_buf *buf = NULL;
@ -604,8 +604,8 @@ success:
#if defined(CONFIG_BLE_MESH_NET_BUF_LOG)
struct net_buf *net_buf_alloc_fixed_debug(struct net_buf_pool *pool,
s32_t timeout, const char *func,
int line)
s32_t timeout, const char *func,
int line)
{
const struct net_buf_pool_fixed *fixed = pool->alloc->alloc_data;
@ -728,8 +728,8 @@ size_t net_buf_linearize(void *dst, size_t dst_len, struct net_buf *src,
* the buffer. It assumes that the buffer has at least one fragment.
*/
size_t net_buf_append_bytes(struct net_buf *buf, size_t len,
const void *value, s32_t timeout,
net_buf_allocator_cb allocate_cb, void *user_data)
const void *value, s32_t timeout,
net_buf_allocator_cb allocate_cb, void *user_data)
{
struct net_buf *frag = net_buf_frag_last(buf);
size_t added_len = 0U;

View File

@ -82,7 +82,7 @@ void bt_mesh_mutex_unlock(bt_mesh_mutex_t *mutex)
}
}
static void bt_mesh_alarm_mutex_new(void)
static inline void bt_mesh_alarm_mutex_new(void)
{
if (!alarm_lock.mutex) {
bt_mesh_mutex_create(&alarm_lock);
@ -99,7 +99,7 @@ void bt_mesh_alarm_unlock(void)
bt_mesh_mutex_unlock(&alarm_lock);
}
static void bt_mesh_list_mutex_new(void)
static inline void bt_mesh_list_mutex_new(void)
{
if (!list_lock.mutex) {
bt_mesh_mutex_create(&list_lock);
@ -116,7 +116,7 @@ void bt_mesh_list_unlock(void)
bt_mesh_mutex_unlock(&list_lock);
}
static void bt_mesh_buf_mutex_new(void)
static inline void bt_mesh_buf_mutex_new(void)
{
if (!buf_lock.mutex) {
bt_mesh_mutex_create(&buf_lock);
@ -133,7 +133,7 @@ void bt_mesh_buf_unlock(void)
bt_mesh_mutex_unlock(&buf_lock);
}
static void bt_mesh_atomic_mutex_new(void)
static inline void bt_mesh_atomic_mutex_new(void)
{
if (!atomic_lock.mutex) {
bt_mesh_mutex_create(&atomic_lock);
@ -159,22 +159,22 @@ void bt_mesh_mutex_init(void)
}
#if CONFIG_BLE_MESH_DEINIT
static void bt_mesh_alarm_mutex_free(void)
static inline void bt_mesh_alarm_mutex_free(void)
{
bt_mesh_mutex_free(&alarm_lock);
}
static void bt_mesh_list_mutex_free(void)
static inline void bt_mesh_list_mutex_free(void)
{
bt_mesh_mutex_free(&list_lock);
}
static void bt_mesh_buf_mutex_free(void)
static inline void bt_mesh_buf_mutex_free(void)
{
bt_mesh_mutex_free(&buf_lock);
}
static void bt_mesh_atomic_mutex_free(void)
static inline void bt_mesh_atomic_mutex_free(void)
{
bt_mesh_mutex_free(&atomic_lock);
}
@ -186,4 +186,4 @@ void bt_mesh_mutex_deinit(void)
bt_mesh_buf_mutex_free();
bt_mesh_atomic_mutex_free();
}
#endif
#endif /* CONFIG_BLE_MESH_DEINIT */

View File

@ -72,7 +72,7 @@ static const bt_mesh_client_op_pair_t cfg_op_pair[] = {
static bt_mesh_mutex_t cfg_client_lock;
static void bt_mesh_cfg_client_mutex_new(void)
static inline void bt_mesh_cfg_client_mutex_new(void)
{
if (!cfg_client_lock.mutex) {
bt_mesh_mutex_create(&cfg_client_lock);
@ -80,18 +80,18 @@ static void bt_mesh_cfg_client_mutex_new(void)
}
#if CONFIG_BLE_MESH_DEINIT
static void bt_mesh_cfg_client_mutex_free(void)
static inline void bt_mesh_cfg_client_mutex_free(void)
{
bt_mesh_mutex_free(&cfg_client_lock);
}
#endif /* CONFIG_BLE_MESH_DEINIT */
static void bt_mesh_cfg_client_lock(void)
static inline void bt_mesh_cfg_client_lock(void)
{
bt_mesh_mutex_lock(&cfg_client_lock);
}
static void bt_mesh_cfg_client_unlock(void)
static inline void bt_mesh_cfg_client_unlock(void)
{
bt_mesh_mutex_unlock(&cfg_client_lock);
}

View File

@ -30,7 +30,7 @@ static const bt_mesh_client_op_pair_t health_op_pair[] = {
static bt_mesh_mutex_t health_client_lock;
static void bt_mesh_health_client_mutex_new(void)
static inline void bt_mesh_health_client_mutex_new(void)
{
if (!health_client_lock.mutex) {
bt_mesh_mutex_create(&health_client_lock);
@ -38,18 +38,18 @@ static void bt_mesh_health_client_mutex_new(void)
}
#if CONFIG_BLE_MESH_DEINIT
static void bt_mesh_health_client_mutex_free(void)
static inline void bt_mesh_health_client_mutex_free(void)
{
bt_mesh_mutex_free(&health_client_lock);
}
#endif /* CONFIG_BLE_MESH_DEINIT */
static void bt_mesh_health_client_lock(void)
static inline void bt_mesh_health_client_lock(void)
{
bt_mesh_mutex_lock(&health_client_lock);
}
static void bt_mesh_health_client_unlock(void)
static inline void bt_mesh_health_client_unlock(void)
{
bt_mesh_mutex_unlock(&health_client_lock);
}

View File

@ -474,7 +474,7 @@ typedef void (*bt_mesh_dh_key_cb_t)(const u8_t key[32], const u8_t idx);
* or BLE_MESH_GATT_ITER_STOP to stop.
*/
typedef u8_t (*bt_mesh_gatt_attr_func_t)(const struct bt_mesh_gatt_attr *attr,
void *user_data);
void *user_data);
/** @brief Connection callback structure.
*

View File

@ -196,7 +196,7 @@ static const struct bt_mesh_prov *prov;
#if defined(CONFIG_BLE_MESH_PB_ADV)
static bt_mesh_mutex_t pb_buf_lock;
static void bt_mesh_pb_buf_mutex_new(void)
static inline void bt_mesh_pb_buf_mutex_new(void)
{
if (!pb_buf_lock.mutex) {
bt_mesh_mutex_create(&pb_buf_lock);
@ -204,18 +204,18 @@ static void bt_mesh_pb_buf_mutex_new(void)
}
#if CONFIG_BLE_MESH_DEINIT
static void bt_mesh_pb_buf_mutex_free(void)
static inline void bt_mesh_pb_buf_mutex_free(void)
{
bt_mesh_mutex_free(&pb_buf_lock);
}
#endif /* CONFIG_BLE_MESH_DEINIT */
static void bt_mesh_pb_buf_lock(void)
static inline void bt_mesh_pb_buf_lock(void)
{
bt_mesh_mutex_lock(&pb_buf_lock);
}
static void bt_mesh_pb_buf_unlock(void)
static inline void bt_mesh_pb_buf_unlock(void)
{
bt_mesh_mutex_unlock(&pb_buf_lock);
}

View File

@ -36,7 +36,7 @@ static u16_t node_count;
static int provisioner_remove_node(u16_t index, bool erase);
static void bt_mesh_provisioner_mutex_new(void)
static inline void bt_mesh_provisioner_mutex_new(void)
{
if (!provisioner_lock.mutex) {
bt_mesh_mutex_create(&provisioner_lock);
@ -44,18 +44,18 @@ static void bt_mesh_provisioner_mutex_new(void)
}
#if CONFIG_BLE_MESH_DEINIT
static void bt_mesh_provisioner_mutex_free(void)
static inline void bt_mesh_provisioner_mutex_free(void)
{
bt_mesh_mutex_free(&provisioner_lock);
}
#endif /* CONFIG_BLE_MESH_DEINIT */
static void bt_mesh_provisioner_lock(void)
static inline void bt_mesh_provisioner_lock(void)
{
bt_mesh_mutex_lock(&provisioner_lock);
}
static void bt_mesh_provisioner_unlock(void)
static inline void bt_mesh_provisioner_unlock(void)
{
bt_mesh_mutex_unlock(&provisioner_lock);
}

View File

@ -356,7 +356,7 @@ static u8_t adv_buf_data[ADV_BUF_SIZE * CONFIG_BLE_MESH_PBA_SAME_TIME];
}
#if defined(CONFIG_BLE_MESH_PB_ADV)
static void bt_mesh_pb_adv_mutex_new(void)
static inline void bt_mesh_pb_adv_mutex_new(void)
{
if (!prov_ctx.pb_adv_lock.mutex) {
bt_mesh_mutex_create(&prov_ctx.pb_adv_lock);
@ -364,23 +364,23 @@ static void bt_mesh_pb_adv_mutex_new(void)
}
#if CONFIG_BLE_MESH_DEINIT
static void bt_mesh_pb_adv_mutex_free(void)
static inline void bt_mesh_pb_adv_mutex_free(void)
{
bt_mesh_mutex_free(&prov_ctx.pb_adv_lock);
}
#endif /* CONFIG_BLE_MESH_DEINIT */
static void bt_mesh_pb_adv_lock(void)
static inline void bt_mesh_pb_adv_lock(void)
{
bt_mesh_mutex_lock(&prov_ctx.pb_adv_lock);
}
static void bt_mesh_pb_adv_unlock(void)
static inline void bt_mesh_pb_adv_unlock(void)
{
bt_mesh_mutex_unlock(&prov_ctx.pb_adv_lock);
}
static void bt_mesh_pb_buf_mutex_new(void)
static inline void bt_mesh_pb_buf_mutex_new(void)
{
if (!prov_ctx.pb_buf_lock.mutex) {
bt_mesh_mutex_create(&prov_ctx.pb_buf_lock);
@ -388,25 +388,25 @@ static void bt_mesh_pb_buf_mutex_new(void)
}
#if CONFIG_BLE_MESH_DEINIT
static void bt_mesh_pb_buf_mutex_free(void)
static inline void bt_mesh_pb_buf_mutex_free(void)
{
bt_mesh_mutex_free(&prov_ctx.pb_buf_lock);
}
#endif /* CONFIG_BLE_MESH_DEINIT */
static void bt_mesh_pb_buf_lock(void)
static inline void bt_mesh_pb_buf_lock(void)
{
bt_mesh_mutex_lock(&prov_ctx.pb_buf_lock);
}
static void bt_mesh_pb_buf_unlock(void)
static inline void bt_mesh_pb_buf_unlock(void)
{
bt_mesh_mutex_unlock(&prov_ctx.pb_buf_lock);
}
#endif /* CONFIG_BLE_MESH_PB_ADV */
#if defined(CONFIG_BLE_MESH_PB_GATT)
static void bt_mesh_pb_gatt_mutex_new(void)
static inline void bt_mesh_pb_gatt_mutex_new(void)
{
if (!prov_ctx.pb_gatt_lock.mutex) {
bt_mesh_mutex_create(&prov_ctx.pb_gatt_lock);
@ -414,18 +414,18 @@ static void bt_mesh_pb_gatt_mutex_new(void)
}
#if CONFIG_BLE_MESH_DEINIT
static void bt_mesh_pb_gatt_mutex_free(void)
static inline void bt_mesh_pb_gatt_mutex_free(void)
{
bt_mesh_mutex_free(&prov_ctx.pb_gatt_lock);
}
#endif /* CONFIG_BLE_MESH_DEINIT */
static void bt_mesh_pb_gatt_lock(void)
static inline void bt_mesh_pb_gatt_lock(void)
{
bt_mesh_mutex_lock(&prov_ctx.pb_gatt_lock);
}
static void bt_mesh_pb_gatt_unlock(void)
static inline void bt_mesh_pb_gatt_unlock(void)
{
bt_mesh_mutex_unlock(&prov_ctx.pb_gatt_lock);
}

View File

@ -171,7 +171,7 @@ struct node_info {
static bt_mesh_mutex_t settings_lock;
static void bt_mesh_settings_mutex_new(void)
static inline void bt_mesh_settings_mutex_new(void)
{
if (settings_lock.mutex == NULL) {
bt_mesh_mutex_create(&settings_lock);
@ -179,7 +179,7 @@ static void bt_mesh_settings_mutex_new(void)
}
#if CONFIG_BLE_MESH_DEINIT
static void bt_mesh_settings_mutex_free(void)
static inline void bt_mesh_settings_mutex_free(void)
{
bt_mesh_mutex_free(&settings_lock);
}

View File

@ -116,7 +116,7 @@ static u16_t hb_sub_dst = BLE_MESH_ADDR_UNASSIGNED;
static bt_mesh_mutex_t tx_seg_lock;
static bt_mesh_mutex_t rx_seg_lock;
static void bt_mesh_tx_seg_mutex_new(void)
static inline void bt_mesh_tx_seg_mutex_new(void)
{
if (!tx_seg_lock.mutex) {
bt_mesh_mutex_create(&tx_seg_lock);
@ -124,23 +124,23 @@ static void bt_mesh_tx_seg_mutex_new(void)
}
#if CONFIG_BLE_MESH_DEINIT
static void bt_mesh_tx_seg_mutex_free(void)
static inline void bt_mesh_tx_seg_mutex_free(void)
{
bt_mesh_mutex_free(&tx_seg_lock);
}
#endif /* CONFIG_BLE_MESH_DEINIT */
static void bt_mesh_tx_seg_lock(void)
static inline void bt_mesh_tx_seg_lock(void)
{
bt_mesh_mutex_lock(&tx_seg_lock);
}
static void bt_mesh_tx_seg_unlock(void)
static inline void bt_mesh_tx_seg_unlock(void)
{
bt_mesh_mutex_unlock(&tx_seg_lock);
}
static void bt_mesh_rx_seg_mutex_new(void)
static inline void bt_mesh_rx_seg_mutex_new(void)
{
if (!rx_seg_lock.mutex) {
bt_mesh_mutex_create(&rx_seg_lock);
@ -148,18 +148,18 @@ static void bt_mesh_rx_seg_mutex_new(void)
}
#if CONFIG_BLE_MESH_DEINIT
static void bt_mesh_rx_seg_mutex_free(void)
static inline void bt_mesh_rx_seg_mutex_free(void)
{
bt_mesh_mutex_free(&rx_seg_lock);
}
#endif /* CONFIG_BLE_MESH_DEINIT */
static void bt_mesh_rx_seg_lock(void)
static inline void bt_mesh_rx_seg_lock(void)
{
bt_mesh_mutex_lock(&rx_seg_lock);
}
static void bt_mesh_rx_seg_unlock(void)
static inline void bt_mesh_rx_seg_unlock(void)
{
bt_mesh_mutex_unlock(&rx_seg_lock);
}

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);
}

View File

@ -18,7 +18,7 @@
static bt_mesh_mutex_t generic_server_lock;
static void bt_mesh_generic_server_mutex_new(void)
static inline void bt_mesh_generic_server_mutex_new(void)
{
if (!generic_server_lock.mutex) {
bt_mesh_mutex_create(&generic_server_lock);
@ -26,7 +26,7 @@ static void bt_mesh_generic_server_mutex_new(void)
}
#if CONFIG_BLE_MESH_DEINIT
static void bt_mesh_generic_server_mutex_free(void)
static inline void bt_mesh_generic_server_mutex_free(void)
{
bt_mesh_mutex_free(&generic_server_lock);
}

View File

@ -18,7 +18,7 @@
static bt_mesh_mutex_t light_server_lock;
static void bt_mesh_light_server_mutex_new(void)
static inline void bt_mesh_light_server_mutex_new(void)
{
if (!light_server_lock.mutex) {
bt_mesh_mutex_create(&light_server_lock);
@ -26,7 +26,7 @@ static void bt_mesh_light_server_mutex_new(void)
}
#if CONFIG_BLE_MESH_DEINIT
static void bt_mesh_light_server_mutex_free(void)
static inline void bt_mesh_light_server_mutex_free(void)
{
bt_mesh_mutex_free(&light_server_lock);
}

View File

@ -23,7 +23,7 @@
static bt_mesh_mutex_t time_scene_server_lock;
static void bt_mesh_time_scene_server_mutex_new(void)
static inline void bt_mesh_time_scene_server_mutex_new(void)
{
if (!time_scene_server_lock.mutex) {
bt_mesh_mutex_create(&time_scene_server_lock);
@ -31,7 +31,7 @@ static void bt_mesh_time_scene_server_mutex_new(void)
}
#if CONFIG_BLE_MESH_DEINIT
static void bt_mesh_time_scene_server_mutex_free(void)
static inline void bt_mesh_time_scene_server_mutex_free(void)
{
bt_mesh_mutex_free(&time_scene_server_lock);
}