summaryrefslogtreecommitdiff
path: root/utility/rtos_compatibility_layers/posix/px_system_manager.c
diff options
context:
space:
mode:
authorTiejun Zhou <[email protected]>2022-10-26 23:41:13 +0000
committerTiejun Zhou <[email protected]>2022-10-26 23:41:13 +0000
commit3e8e85cdc1e51f9de577457377a4f9a4f6b9b82f (patch)
tree861c0ab74e5dc5de7509b4b85f5e75dd74457117 /utility/rtos_compatibility_layers/posix/px_system_manager.c
parentb871c33620f9b58a83e92a33f4ca00025e850c7f (diff)
Release 6.2.0v6.2.0_rel
Diffstat (limited to 'utility/rtos_compatibility_layers/posix/px_system_manager.c')
-rw-r--r--utility/rtos_compatibility_layers/posix/px_system_manager.c36
1 files changed, 24 insertions, 12 deletions
diff --git a/utility/rtos_compatibility_layers/posix/px_system_manager.c b/utility/rtos_compatibility_layers/posix/px_system_manager.c
index 8204b4e3..0e6c6a32 100644
--- a/utility/rtos_compatibility_layers/posix/px_system_manager.c
+++ b/utility/rtos_compatibility_layers/posix/px_system_manager.c
@@ -31,7 +31,7 @@
/* FUNCTION RELEASE */
/* */
/* posix_system_manager_entry PORTABLE C */
-/* 6.1.7 */
+/* 6.2.0 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
@@ -63,7 +63,9 @@
/* */
/* DATE NAME DESCRIPTION */
/* */
-/* 06-02-2021 William E. Lamie Initial Version 6.1.7 */
+/* 06-02-2021 William E. Lamie Initial Version 6.1.7 */
+/* 10-31-2022 Scott Larson Add 64-bit support, */
+/* resulting in version 6.2.0 */
/* */
/**************************************************************************/
VOID posix_system_manager_entry(ULONG input)
@@ -72,25 +74,35 @@ VOID posix_system_manager_entry(ULONG input)
UINT status;
ULONG request[WORK_REQ_SIZE];
-
- /* Avoid compiler warning. */
- if (input) { }
+POSIX_TCB *pthread_ptr;
+VOID *value_ptr;
+
+ /* Avoid compiler warning. */
+ TX_PARAMETER_NOT_USED(input);
/* Loop forever, waiting for work requests. */
while(1)
{
- /* Wait forever for the next work request. */
+ /* Wait forever for the next work request. */
status = tx_queue_receive(&posix_work_queue, &request, TX_WAIT_FOREVER);
/* Make sure we didn't encounter any trouble. */
if (status != TX_SUCCESS)
{
- /* Hmmmm... should not happen. */
- /* Anywayjust go back and get the next message. */
- continue;
+ /* Get the next message. */
+ continue;
}
- /* Go delete the pthread */
- posix_do_pthread_delete((POSIX_TCB *)request[0], (VOID *)request[1] );
- } /* System Manager forever loop */
+ #ifdef TX_64_BIT
+ pthread_ptr = (POSIX_TCB *)((((ALIGN_TYPE)request[0]) << 32) | request[1]);
+ value_ptr = (VOID *)((((ALIGN_TYPE)request[2]) << 32) | request[3]);
+ #else
+ pthread_ptr = (POSIX_TCB *)request[0];
+ value_ptr = (VOID *)request[1];
+ #endif
+
+ /* Delete the pthread */
+ posix_do_pthread_delete(pthread_ptr, value_ptr);
+
+ } /* System Manager forever loop */
}