Release 6.1.9
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
/** */
|
||||
/** ThreadX Component */
|
||||
/** */
|
||||
/** ThreadX Component */
|
||||
/** */
|
||||
/** Semaphore */
|
||||
/** */
|
||||
@@ -32,48 +32,50 @@
|
||||
#include "tx_semaphore.h"
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* FUNCTION RELEASE */
|
||||
/* */
|
||||
/* _txe_semaphore_create PORTABLE C */
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* FUNCTION RELEASE */
|
||||
/* */
|
||||
/* _txe_semaphore_create PORTABLE C */
|
||||
/* 6.1 */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* William E. Lamie, Microsoft Corporation */
|
||||
/* */
|
||||
/* DESCRIPTION */
|
||||
/* */
|
||||
/* This function checks for errors in the create semaphore function */
|
||||
/* call. */
|
||||
/* */
|
||||
/* INPUT */
|
||||
/* */
|
||||
/* semaphore_ptr Pointer to semaphore control block*/
|
||||
/* name_ptr Pointer to semaphore name */
|
||||
/* initial_count Initial semaphore count */
|
||||
/* */
|
||||
/* This function checks for errors in the create semaphore function */
|
||||
/* call. */
|
||||
/* */
|
||||
/* INPUT */
|
||||
/* */
|
||||
/* semaphore_ptr Pointer to semaphore control block*/
|
||||
/* name_ptr Pointer to semaphore name */
|
||||
/* initial_count Initial semaphore count */
|
||||
/* semaphore_control_block_size Size of semaphore control block */
|
||||
/* */
|
||||
/* OUTPUT */
|
||||
/* */
|
||||
/* TX_SEMAPHORE_ERROR Invalid semaphore pointer */
|
||||
/* TX_CALLER_ERROR Invalid caller of this function */
|
||||
/* status Actual completion status */
|
||||
/* */
|
||||
/* CALLS */
|
||||
/* */
|
||||
/* _tx_semaphore_create Actual create semaphore function */
|
||||
/* _tx_thread_system_preempt_check Check for preemption */
|
||||
/* */
|
||||
/* CALLED BY */
|
||||
/* */
|
||||
/* Application Code */
|
||||
/* */
|
||||
/* RELEASE HISTORY */
|
||||
/* */
|
||||
/* */
|
||||
/* OUTPUT */
|
||||
/* */
|
||||
/* TX_SEMAPHORE_ERROR Invalid semaphore pointer */
|
||||
/* TX_CALLER_ERROR Invalid caller of this function */
|
||||
/* status Actual completion status */
|
||||
/* */
|
||||
/* CALLS */
|
||||
/* */
|
||||
/* _tx_semaphore_create Actual create semaphore 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_semaphore_create(TX_SEMAPHORE *semaphore_ptr, CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size)
|
||||
@@ -81,7 +83,7 @@ UINT _txe_semaphore_create(TX_SEMAPHORE *semaphore_ptr, CHAR *name_ptr, ULONG i
|
||||
|
||||
TX_INTERRUPT_SAVE_AREA
|
||||
|
||||
UINT status;
|
||||
UINT status;
|
||||
ULONG i;
|
||||
TX_SEMAPHORE *next_semaphore;
|
||||
#ifndef TX_TIMER_PROCESS_IN_ISR
|
||||
@@ -127,12 +129,12 @@ TX_THREAD *thread_ptr;
|
||||
/* Determine if this semaphore matches the current semaphore in the list. */
|
||||
if (semaphore_ptr == next_semaphore)
|
||||
{
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
/* Move to next semaphore. */
|
||||
next_semaphore = next_semaphore -> tx_semaphore_created_next;
|
||||
}
|
||||
@@ -143,7 +145,7 @@ TX_THREAD *thread_ptr;
|
||||
|
||||
/* Decrement the preempt disable flag. */
|
||||
_tx_thread_preempt_disable--;
|
||||
|
||||
|
||||
/* Restore interrupts. */
|
||||
TX_RESTORE
|
||||
|
||||
@@ -161,7 +163,7 @@ TX_THREAD *thread_ptr;
|
||||
#ifndef TX_TIMER_PROCESS_IN_ISR
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
/* Pickup thread pointer. */
|
||||
TX_THREAD_GET_CURRENT(thread_ptr)
|
||||
|
||||
@@ -183,11 +185,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