mirror of
https://github.com/cuberite/polarssl.git
synced 2025-10-01 17:40:53 -04:00
Remove mutex calls in psa_wipe_all_key_slots
Code size and code style improvement, these calls aren't needed. Signed-off-by: Ryan Everett <ryan.everett@arm.com>
This commit is contained in:
parent
3af9bc18f3
commit
a76a0011ab
@ -144,9 +144,6 @@ void psa_wipe_all_key_slots(void)
|
|||||||
{
|
{
|
||||||
size_t slot_idx;
|
size_t slot_idx;
|
||||||
|
|
||||||
#if defined(MBEDTLS_THREADING_C)
|
|
||||||
mbedtls_mutex_lock(&mbedtls_threading_key_slot_mutex);
|
|
||||||
#endif
|
|
||||||
for (slot_idx = 0; slot_idx < MBEDTLS_PSA_KEY_SLOT_COUNT; slot_idx++) {
|
for (slot_idx = 0; slot_idx < MBEDTLS_PSA_KEY_SLOT_COUNT; slot_idx++) {
|
||||||
psa_key_slot_t *slot = &global_data.key_slots[slot_idx];
|
psa_key_slot_t *slot = &global_data.key_slots[slot_idx];
|
||||||
slot->registered_readers = 1;
|
slot->registered_readers = 1;
|
||||||
@ -154,9 +151,6 @@ void psa_wipe_all_key_slots(void)
|
|||||||
(void) psa_wipe_key_slot(slot);
|
(void) psa_wipe_key_slot(slot);
|
||||||
}
|
}
|
||||||
global_data.key_slots_initialized = 0;
|
global_data.key_slots_initialized = 0;
|
||||||
#if defined(MBEDTLS_THREADING_C)
|
|
||||||
mbedtls_mutex_unlock(&mbedtls_threading_key_slot_mutex);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
psa_status_t psa_reserve_free_key_slot(psa_key_id_t *volatile_key_id,
|
psa_status_t psa_reserve_free_key_slot(psa_key_id_t *volatile_key_id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user