Release 6.1.9
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
/** */
|
||||
/** ThreadX Component */
|
||||
/** */
|
||||
/** ThreadX Component */
|
||||
/** */
|
||||
/** Mutex */
|
||||
/** */
|
||||
@@ -32,49 +32,51 @@
|
||||
#include "tx_mutex.h"
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* FUNCTION RELEASE */
|
||||
/* */
|
||||
/* _txe_mutex_create PORTABLE C */
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* FUNCTION RELEASE */
|
||||
/* */
|
||||
/* _txe_mutex_create PORTABLE C */
|
||||
/* 6.1 */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* William E. Lamie, Microsoft Corporation */
|
||||
/* */
|
||||
/* DESCRIPTION */
|
||||
/* */
|
||||
/* This function checks for errors in the create mutex function */
|
||||
/* call. */
|
||||
/* */
|
||||
/* INPUT */
|
||||
/* */
|
||||
/* mutex_ptr Pointer to mutex control block */
|
||||
/* name_ptr Pointer to mutex name */
|
||||
/* inherit Initial mutex count */
|
||||
/* */
|
||||
/* This function checks for errors in the create mutex function */
|
||||
/* call. */
|
||||
/* */
|
||||
/* INPUT */
|
||||
/* */
|
||||
/* mutex_ptr Pointer to mutex control block */
|
||||
/* name_ptr Pointer to mutex name */
|
||||
/* inherit Initial mutex count */
|
||||
/* mutex_control_block_size Size of mutex control block */
|
||||
/* */
|
||||
/* OUTPUT */
|
||||
/* */
|
||||
/* TX_MUTEX_ERROR Invalid mutex pointer */
|
||||
/* TX_CALLER_ERROR Invalid caller of this function */
|
||||
/* TX_INHERIT_ERROR Invalid inherit option */
|
||||
/* status Actual completion status */
|
||||
/* */
|
||||
/* CALLS */
|
||||
/* */
|
||||
/* _tx_mutex_create Actual create mutex function */
|
||||
/* _tx_thread_system_preempt_check Check for preemption */
|
||||
/* */
|
||||
/* CALLED BY */
|
||||
/* */
|
||||
/* Application Code */
|
||||
/* */
|
||||
/* RELEASE HISTORY */
|
||||
/* */
|
||||
/* */
|
||||
/* OUTPUT */
|
||||
/* */
|
||||
/* TX_MUTEX_ERROR Invalid mutex pointer */
|
||||
/* TX_CALLER_ERROR Invalid caller of this function */
|
||||
/* TX_INHERIT_ERROR Invalid inherit option */
|
||||
/* status Actual completion status */
|
||||
/* */
|
||||
/* CALLS */
|
||||
/* */
|
||||
/* _tx_mutex_create Actual create mutex function */
|
||||
/* _tx_thread_system_preempt_check Check for preemption */
|
||||
/* */
|
||||
/* CALLED BY */
|
||||
/* */
|
||||
/* Application Code */
|
||||
/* */
|
||||
/* RELEASE HISTORY */
|
||||
/* */
|
||||
/* DATE NAME DESCRIPTION */
|
||||
/* */
|
||||
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
|
||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
||||
/* 09-30-2020 Yuxin Zhou Modified comment(s), */
|
||||
/* resulting in version 6.1 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _txe_mutex_create(TX_MUTEX *mutex_ptr, CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size)
|
||||
@@ -82,7 +84,7 @@ UINT _txe_mutex_create(TX_MUTEX *mutex_ptr, CHAR *name_ptr, UINT inherit, UINT
|
||||
|
||||
TX_INTERRUPT_SAVE_AREA
|
||||
|
||||
UINT status;
|
||||
UINT status;
|
||||
ULONG i;
|
||||
TX_MUTEX *next_mutex;
|
||||
#ifndef TX_TIMER_PROCESS_IN_ISR
|
||||
@@ -100,7 +102,7 @@ TX_THREAD *thread_ptr;
|
||||
/* Mutex pointer is invalid, return appropriate error code. */
|
||||
status = TX_MUTEX_ERROR;
|
||||
}
|
||||
|
||||
|
||||
/* Now check to make sure the control block is the correct size. */
|
||||
else if (mutex_control_block_size != (sizeof(TX_MUTEX)))
|
||||
{
|
||||
@@ -144,7 +146,7 @@ TX_THREAD *thread_ptr;
|
||||
|
||||
/* Decrement the preempt disable flag. */
|
||||
_tx_thread_preempt_disable--;
|
||||
|
||||
|
||||
/* Restore interrupts. */
|
||||
TX_RESTORE
|
||||
|
||||
@@ -160,14 +162,14 @@ TX_THREAD *thread_ptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
/* Check for a valid inherit option. */
|
||||
if (inherit != TX_INHERIT)
|
||||
{
|
||||
|
||||
if (inherit != TX_NO_INHERIT)
|
||||
{
|
||||
|
||||
|
||||
/* Inherit option is illegal. */
|
||||
status = TX_INHERIT_ERROR;
|
||||
}
|
||||
@@ -196,11 +198,11 @@ TX_THREAD *thread_ptr;
|
||||
/* Check for interrupt call. */
|
||||
if (TX_THREAD_GET_SYSTEM_STATE() != ((ULONG) 0))
|
||||
{
|
||||
|
||||
|
||||
/* Now, make sure the call is from an interrupt and not initialization. */
|
||||
if (TX_THREAD_GET_SYSTEM_STATE() < TX_INITIALIZE_IN_PROGRESS)
|
||||
{
|
||||
|
||||
|
||||
/* Invalid caller of this function, return appropriate error code. */
|
||||
status = TX_CALLER_ERROR;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user