summaryrefslogtreecommitdiff
path: root/common_smp/src/tx_semaphore_put.c
diff options
context:
space:
mode:
authorYuxin Zhou <[email protected]>2021-10-14 00:51:26 +0000
committerYuxin Zhou <[email protected]>2021-10-14 00:51:26 +0000
commit1af8404c54f9c8d3caa2ac3523c2a5f014aecb1c (patch)
tree93e4f4d64ec8c21c01b77f19b8e7326e85227e3d /common_smp/src/tx_semaphore_put.c
parent215df45d4b59d4ce8606a88f566d1d426e64a84c (diff)
Release 6.1.9
Diffstat (limited to 'common_smp/src/tx_semaphore_put.c')
-rw-r--r--common_smp/src/tx_semaphore_put.c74
1 files changed, 38 insertions, 36 deletions
diff --git a/common_smp/src/tx_semaphore_put.c b/common_smp/src/tx_semaphore_put.c
index 53748cf1..53db1a8b 100644
--- a/common_smp/src/tx_semaphore_put.c
+++ b/common_smp/src/tx_semaphore_put.c
@@ -12,8 +12,8 @@
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** Semaphore */
/** */
@@ -31,43 +31,45 @@
#include "tx_semaphore.h"
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_semaphore_put PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_semaphore_put PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function puts an instance into the specified counting */
-/* semaphore. */
-/* */
-/* INPUT */
-/* */
-/* semaphore_ptr Pointer to semaphore control block*/
-/* */
-/* OUTPUT */
-/* */
-/* TX_SUCCESS Success completion status */
-/* */
-/* CALLS */
-/* */
-/* _tx_thread_system_resume Resume thread service */
-/* _tx_thread_system_ni_resume Non-interruptable resume thread */
-/* */
-/* CALLED BY */
-/* */
-/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* */
+/* This function puts an instance into the specified counting */
+/* semaphore. */
+/* */
+/* INPUT */
+/* */
+/* semaphore_ptr Pointer to semaphore control block*/
+/* */
+/* OUTPUT */
+/* */
+/* TX_SUCCESS Success completion status */
+/* */
+/* CALLS */
+/* */
+/* _tx_thread_system_resume Resume thread service */
+/* _tx_thread_system_ni_resume Non-interruptable resume thread */
+/* */
+/* 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 _tx_semaphore_put(TX_SEMAPHORE *semaphore_ptr)
@@ -79,7 +81,7 @@ TX_INTERRUPT_SAVE_AREA
VOID (*semaphore_put_notify)(struct TX_SEMAPHORE_STRUCT *notify_semaphore_ptr);
#endif
-TX_THREAD *thread_ptr;
+TX_THREAD *thread_ptr;
UINT suspended_count;
TX_THREAD *next_thread;
TX_THREAD *previous_thread;
@@ -137,7 +139,7 @@ TX_THREAD *previous_thread;
{
/* A thread is suspended on this semaphore. */
-
+
/* Pickup the pointer to the first suspended thread. */
thread_ptr = semaphore_ptr -> tx_semaphore_suspension_list;
@@ -166,8 +168,8 @@ TX_THREAD *previous_thread;
previous_thread = thread_ptr -> tx_thread_suspended_previous;
next_thread -> tx_thread_suspended_previous = previous_thread;
previous_thread -> tx_thread_suspended_next = next_thread;
- }
-
+ }
+
/* Decrement the suspension count. */
semaphore_ptr -> tx_semaphore_suspended_count = suspended_count;
@@ -183,7 +185,7 @@ TX_THREAD *previous_thread;
#endif
/* Put return status into the thread control block. */
- thread_ptr -> tx_thread_suspend_status = TX_SUCCESS;
+ thread_ptr -> tx_thread_suspend_status = TX_SUCCESS;
#ifdef TX_NOT_INTERRUPTABLE