Skip to content

Commit ac1e1f1

Browse files
ppryga-nordicnordicjm
authored andcommitted
mpsl: Add multithread lock acquire prerequisite to unint header
The mpsl_lib_uninit() may not be called without the multithreading lock acquired: MULTITHREADING_LOCK_ACQUIRE(). That could lead to a race condition between uninit call and mpsl_low_prio_work_handler(). It is a user responsibility to call MULTITHREADING_LOCK_ACQUIRE() before the mpsl_lib_uninit(). For example please see hci_driver_close(). Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
1 parent 05597d7 commit ac1e1f1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/mpsl/mpsl_lib.h

+2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ int32_t mpsl_lib_init(void);
5050
* user to override any interrupt handlers used by MPSL.
5151
*
5252
* @pre This method requires CONFIG_MPSL_DYNAMIC_INTERRUPTS to be enabled.
53+
* @pre The function requires the multithreading lock (@see MULTITHREADING_LOCK_ACQUIRE())
54+
* to be acquired before.
5355
*
5456
* @note
5557
* After successful execution of this method, user-supplied interrupt

0 commit comments

Comments
 (0)