diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-01-20 16:26:48 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-01-20 16:26:48 +0000 |
commit | 22e22db0161126d1c58a07e2323662efc18d6c86 (patch) | |
tree | e59efd65935cdb9d1358a598925a0a3fa5ace5fd /src/chmtx.c | |
parent | b1d77bf4bc7fb6e89b5280d99f401caa50c8a0d8 (diff) | |
download | ChibiOS-22e22db0161126d1c58a07e2323662efc18d6c86.tar.gz ChibiOS-22e22db0161126d1c58a07e2323662efc18d6c86.tar.bz2 ChibiOS-22e22db0161126d1c58a07e2323662efc18d6c86.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@649 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src/chmtx.c')
-rw-r--r-- | src/chmtx.c | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/src/chmtx.c b/src/chmtx.c index 8288cfe89..47d1d7969 100644 --- a/src/chmtx.c +++ b/src/chmtx.c @@ -27,8 +27,12 @@ #ifdef CH_USE_MUTEXES /** - * Initializes s @p Mutex structure. + * @brief Initializes s @p Mutex structure. + * * @param mp pointer to a @p Mutex structure + * @note This function can be invoked from within an interrupt handler even if + * it is not an I-Class API because it does not touch any critical kernel + * data structure. */ void chMtxInit(Mutex *mp) { @@ -37,7 +41,8 @@ void chMtxInit(Mutex *mp) { } /** - * Locks the specified mutex. + * @brief Locks the specified mutex. + * * @param mp pointer to the @p Mutex structure */ void chMtxLock(Mutex *mp) { @@ -50,7 +55,7 @@ void chMtxLock(Mutex *mp) { } /** - * Locks the specified mutex. + * @brief Locks the specified mutex. * * @param mp pointer to the @p Mutex structure * @note This function must be called within a @p chSysLock() / @p chSysUnlock() @@ -110,9 +115,11 @@ void chMtxLockS(Mutex *mp) { } /** - * Tries to lock a mutex. This function does not have any overhead related to + * @brief Tries to lock a mutex. + * @details This function does not have any overhead related to * the priority inheritance mechanism because it does not try to enter a sleep * state on the mutex. + * * @param mp pointer to the @p Mutex structure * @retval TRUE if the mutex was successfully acquired * @retval FALSE if the lock attempt failed. @@ -129,7 +136,8 @@ bool_t chMtxTryLock(Mutex *mp) { } /** - * Tries to lock a mutex. This function does not have any overhead related to + * @brief Tries to lock a mutex. + * @details This function does not have any overhead related to * the priority inheritance mechanism because it does not try to enter a sleep * state on the mutex. * @param mp pointer to the @p Mutex structure @@ -149,7 +157,8 @@ bool_t chMtxTryLockS(Mutex *mp) { } /** - * Unlocks the next owned mutex in reverse lock order. + * @brief Unlocks the next owned mutex in reverse lock order. + * * @return The pointer to the unlocked mutex. */ Mutex *chMtxUnlock(void) { @@ -194,7 +203,8 @@ Mutex *chMtxUnlock(void) { } /** - * Unlocks the next owned mutex in reverse lock order. + * @brief Unlocks the next owned mutex in reverse lock order. + * * @return The pointer to the unlocked mutex. * @note This function must be called within a @p chSysLock() / @p chSysUnlock() * block. @@ -234,10 +244,11 @@ Mutex *chMtxUnlockS(void) { } /** - * Unlocks all the mutexes owned by the invoking thread, this is <b>MUCH MORE</b> - * efficient than releasing the mutexes one by one and not just because the - * call overhead, this function does not have any overhead related to the - * priority inheritance mechanism. + * @brief Unlocks all the mutexes owned by the invoking thread. + * @details This function is <b>MUCH MORE</b> efficient than releasing the + * mutexes one by one and not just because the call overhead, this function + * does not have any overhead related to the priority inheritance mechanism + * too. */ void chMtxUnlockAll(void) { |