mirror of
https://github.com/espressif/esp-idf.git
synced 2025-12-07 17:08:49 +00:00
ble_mesh: Remove useless parameters of lock/unlock
This commit is contained in:
@@ -55,15 +55,14 @@ bt_mesh_atomic_val_t bt_mesh_atomic_get(const bt_mesh_atomic_t *target)
|
||||
*/
|
||||
bt_mesh_atomic_val_t bt_mesh_atomic_set(bt_mesh_atomic_t *target, bt_mesh_atomic_val_t value)
|
||||
{
|
||||
unsigned int key;
|
||||
bt_mesh_atomic_val_t ret;
|
||||
|
||||
key = bt_mesh_irq_lock();
|
||||
bt_mesh_irq_lock();
|
||||
|
||||
ret = *target;
|
||||
*target = value;
|
||||
|
||||
bt_mesh_irq_unlock(key);
|
||||
bt_mesh_irq_unlock();
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -83,15 +82,14 @@ bt_mesh_atomic_val_t bt_mesh_atomic_set(bt_mesh_atomic_t *target, bt_mesh_atomic
|
||||
*/
|
||||
bt_mesh_atomic_val_t bt_mesh_atomic_or(bt_mesh_atomic_t *target, bt_mesh_atomic_val_t value)
|
||||
{
|
||||
unsigned int key;
|
||||
bt_mesh_atomic_val_t ret;
|
||||
|
||||
key = bt_mesh_irq_lock();
|
||||
bt_mesh_irq_lock();
|
||||
|
||||
ret = *target;
|
||||
*target |= value;
|
||||
|
||||
bt_mesh_irq_unlock(key);
|
||||
bt_mesh_irq_unlock();
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -111,15 +109,14 @@ bt_mesh_atomic_val_t bt_mesh_atomic_or(bt_mesh_atomic_t *target, bt_mesh_atomic_
|
||||
*/
|
||||
bt_mesh_atomic_val_t bt_mesh_atomic_and(bt_mesh_atomic_t *target, bt_mesh_atomic_val_t value)
|
||||
{
|
||||
unsigned int key;
|
||||
bt_mesh_atomic_val_t ret;
|
||||
|
||||
key = bt_mesh_irq_lock();
|
||||
bt_mesh_irq_lock();
|
||||
|
||||
ret = *target;
|
||||
*target &= value;
|
||||
|
||||
bt_mesh_irq_unlock(key);
|
||||
bt_mesh_irq_unlock();
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -137,15 +134,14 @@ bt_mesh_atomic_val_t bt_mesh_atomic_and(bt_mesh_atomic_t *target, bt_mesh_atomic
|
||||
*/
|
||||
bt_mesh_atomic_val_t bt_mesh_atomic_dec(bt_mesh_atomic_t *target)
|
||||
{
|
||||
unsigned int key;
|
||||
bt_mesh_atomic_val_t ret;
|
||||
|
||||
key = bt_mesh_irq_lock();
|
||||
bt_mesh_irq_lock();
|
||||
|
||||
ret = *target;
|
||||
(*target)--;
|
||||
|
||||
bt_mesh_irq_unlock(key);
|
||||
bt_mesh_irq_unlock();
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -163,15 +159,14 @@ bt_mesh_atomic_val_t bt_mesh_atomic_dec(bt_mesh_atomic_t *target)
|
||||
*/
|
||||
bt_mesh_atomic_val_t bt_mesh_atomic_inc(bt_mesh_atomic_t *target)
|
||||
{
|
||||
unsigned int key;
|
||||
bt_mesh_atomic_val_t ret;
|
||||
|
||||
key = bt_mesh_irq_lock();
|
||||
bt_mesh_irq_lock();
|
||||
|
||||
ret = *target;
|
||||
(*target)++;
|
||||
|
||||
bt_mesh_irq_unlock(key);
|
||||
bt_mesh_irq_unlock();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user