Skip to content

Commit eadf08b

Browse files
committed
Update documentation for multicore_lockout_end functions
1 parent e91da36 commit eadf08b

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

src/rp2_common/pico_multicore/include/pico/multicore.h

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ static inline uint multicore_doorbell_irq_num(uint doorbell_num) {
437437
* The core which wishes to lockout the other core calls \ref multicore_lockout_start_blocking or
438438
* \ref multicore_lockout_start_timeout_us to interrupt the other "victim" core and wait for it to be in a
439439
* "locked out" state. Once the lockout is no longer needed it calls \ref multicore_lockout_end_blocking or
440-
* \ref multicore_lockout_end_timeout_us to release the lockout and wait for confirmation.
440+
* \ref multicore_lockout_end_timeout_us to release the lockout.
441441
*
442442
* \note Because multicore lockout uses the intercore FIFOs, the FIFOs <b>cannot</b> be used for any other purpose
443443
*/
@@ -491,27 +491,31 @@ void multicore_lockout_start_blocking(void);
491491
*/
492492
bool multicore_lockout_start_timeout_us(uint64_t timeout_us);
493493

494-
/*! \brief Release the other core from a locked out state amd wait for it to acknowledge
494+
/*! \brief Release the other core from a locked out state
495495
* \ingroup multicore_lockout
496496
*
497-
* \note The other core must previously have been "locked out" by calling a `multicore_lockout_start_` function
498-
* from this core
497+
* The other core must previously have been "locked out" by calling a `multicore_lockout_start_` function
498+
* from this core.
499+
*
500+
* \note The other core will leave the lockout state if this function is called.
501+
* The function only blocks for access to a lockout mutex, it does not wait for the other core
502+
* to leave the lockout state.
499503
*/
500504
void multicore_lockout_end_blocking(void);
501505

502-
/*! \brief Release the other core from a locked out state amd wait up to a time limit for it to acknowledge
506+
/*! \brief Release the other core from a locked out state
503507
* \ingroup multicore_lockout
504508
*
505509
* The other core must previously have been "locked out" by calling a `multicore_lockout_start_` function
506510
* from this core
507511
*
508-
* \note be very careful using small timeout values, as a timeout here will leave the "lockout" functionality
509-
* in a bad state. It is probably preferable to use \ref multicore_lockout_end_blocking anyway as if you have
510-
* already waited for the victim core to enter the lockout state, then the victim core will be ready to exit
511-
* the lockout state very quickly.
512+
* \note The other core will leave the lockout state if this function returns true.
513+
* The function only blocks for access to a lockout mutex, it does not wait for the other core
514+
* to leave the lockout state. If the lockout mutex could not be acquired, the function returns
515+
* false and no action is taken.
512516
*
513517
* \param timeout_us the timeout in microseconds
514-
* \return true if the other core successfully exited locked out state within the timeout, false otherwise
518+
* \return true if the other core will leave the lockout state, false otherwise
515519
*/
516520
bool multicore_lockout_end_timeout_us(uint64_t timeout_us);
517521

0 commit comments

Comments
 (0)