1 /*
2  * Copyright (c) 2023 Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Note that the function prototypes are taken from the NRFx HAL
7  */
8 #include "hal/nrf_mutex.h"
9 #include "bs_tracing.h"
10 #include "NHW_MUTEX.h"
11 
nrf_mutex_lock(NRF_MUTEX_Type * p_reg,uint8_t mutex)12 bool nrf_mutex_lock(NRF_MUTEX_Type * p_reg, uint8_t mutex)
13 {
14     (void) p_reg;
15     return (nhw_MUTEX_regr_sideeffects_MUTEX(mutex) == MUTEX_MUTEX_MUTEX_Unlocked);
16 }
17 
nrf_mutex_unlock(NRF_MUTEX_Type * p_reg,uint8_t mutex)18 void nrf_mutex_unlock(NRF_MUTEX_Type * p_reg, uint8_t mutex)
19 {
20     (void) p_reg;
21     nhw_MUTEX_regw_sideeffects_MUTEX(mutex);
22 }
23