Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1017, resolve discrepancies between mutex API and unit tests #1044

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions src/os/inc/osapi-mutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ typedef struct
*
* Mutex semaphores are always created in the unlocked (full) state.
*
* @param[out] sem_id will be set to the non-zero ID of the newly-created resource
* @param[in] sem_name the name of the new resource to create
* @param[out] sem_id will be set to the non-zero ID of the newly-created resource @nonnull
* @param[in] sem_name the name of the new resource to create @nonnull
* @param[in] options reserved for future use. Should be passed as 0.
*
* @return Execution status, see @ref OSReturnCodes
Expand All @@ -57,7 +57,7 @@ typedef struct
* @retval #OS_ERR_NAME_TOO_LONG name length including null terminator greater than #OS_MAX_API_NAME
* @retval #OS_ERR_NO_FREE_IDS if there are no more free mutex Ids
* @retval #OS_ERR_NAME_TAKEN if there is already a mutex with the same name
* @retval #OS_SEM_FAILURE if the OS call failed
* @retval #OS_SEM_FAILURE if the OS call failed @covtest
*/
int32 OS_MutSemCreate(osal_id_t *sem_id, const char *sem_name, uint32 options);

Expand All @@ -75,7 +75,7 @@ int32 OS_MutSemCreate(osal_id_t *sem_id, const char *sem_name, uint32 options);
* @return Execution status, see @ref OSReturnCodes
* @retval #OS_SUCCESS @copybrief OS_SUCCESS
* @retval #OS_ERR_INVALID_ID if the id passed in is not a valid mutex
* @retval #OS_SEM_FAILURE if an unspecified error occurs
* @retval #OS_SEM_FAILURE if an unspecified error occurs @covtest
*/
int32 OS_MutSemGive(osal_id_t sem_id);

Expand All @@ -92,9 +92,8 @@ int32 OS_MutSemGive(osal_id_t sem_id);
*
* @return Execution status, see @ref OSReturnCodes
* @retval #OS_SUCCESS @copybrief OS_SUCCESS
* @retval #OS_SEM_FAILURE if the semaphore was not previously initialized or is
* not in the array of semaphores defined by the system
* @retval #OS_ERR_INVALID_ID the id passed in is not a valid mutex
* @retval #OS_SEM_FAILURE if an unspecified error occurs @covtest
*/
int32 OS_MutSemTake(osal_id_t sem_id);

Expand All @@ -110,7 +109,7 @@ int32 OS_MutSemTake(osal_id_t sem_id);
* @return Execution status, see @ref OSReturnCodes
* @retval #OS_SUCCESS @copybrief OS_SUCCESS
* @retval #OS_ERR_INVALID_ID if the id passed in is not a valid mutex
* @retval #OS_SEM_FAILURE if the OS call failed
* @retval #OS_SEM_FAILURE if an unspecified error occurs @covtest
*/
int32 OS_MutSemDelete(osal_id_t sem_id);

Expand All @@ -122,7 +121,7 @@ int32 OS_MutSemDelete(osal_id_t sem_id);
* The id is returned through sem_id
*
* @param[out] sem_id will be set to the ID of the existing resource
* @param[in] sem_name the name of the existing resource to find
* @param[in] sem_name the name of the existing resource to find @nonnull
*
* @return Execution status, see @ref OSReturnCodes
* @retval #OS_SUCCESS @copybrief OS_SUCCESS
Expand All @@ -140,8 +139,8 @@ int32 OS_MutSemGetIdByName(osal_id_t *sem_id, const char *sem_name);
* all of the relevant info( name and creator) about the specified mutex
* semaphore.
*
* @param[in] sem_id The object ID to operate on
* @param[out] mut_prop The property object buffer to fill
* @param[in] sem_id The object ID to operate on
* @param[out] mut_prop The property object buffer to fill @nonnull
*
* @return Execution status, see @ref OSReturnCodes
* @retval #OS_SUCCESS @copybrief OS_SUCCESS
Expand Down