diff options
| author | Tiejun Zhou <[email protected]> | 2022-10-26 23:41:13 +0000 |
|---|---|---|
| committer | Tiejun Zhou <[email protected]> | 2022-10-26 23:41:13 +0000 |
| commit | 3e8e85cdc1e51f9de577457377a4f9a4f6b9b82f (patch) | |
| tree | 861c0ab74e5dc5de7509b4b85f5e75dd74457117 /utility/rtos_compatibility_layers/posix/px_pth_create.c | |
| parent | b871c33620f9b58a83e92a33f4ca00025e850c7f (diff) | |
Release 6.2.0v6.2.0_rel
Diffstat (limited to 'utility/rtos_compatibility_layers/posix/px_pth_create.c')
| -rw-r--r-- | utility/rtos_compatibility_layers/posix/px_pth_create.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/utility/rtos_compatibility_layers/posix/px_pth_create.c b/utility/rtos_compatibility_layers/posix/px_pth_create.c index 511026db..60b79f84 100644 --- a/utility/rtos_compatibility_layers/posix/px_pth_create.c +++ b/utility/rtos_compatibility_layers/posix/px_pth_create.c @@ -32,7 +32,7 @@ /* FUNCTION RELEASE */ /* */ /* pthread_create PORTABLE C */ -/* 6.1.7 */ +/* 6.2.0 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -98,7 +98,10 @@ /* */ /* 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, */ +/* remove double parenthesis, */ +/* resulting in version 6.2.0 */ /* */ /**************************************************************************/ INT pthread_create (pthread_t *thread, pthread_attr_t *attr, @@ -211,7 +214,7 @@ INT status,retval; status = posix_memory_allocate( pthread_ptr->stack_size, &(pthread_ptr->stack_address)); /* problem allocating stack space */ - if ((status == ERROR)) + if (status == ERROR) { /* Configuration/resource error. */ return(EAGAIN); @@ -227,17 +230,19 @@ INT status,retval; /* Now actually create and start the thread. */ /* convert Posix priorities to Threadx priority */ - retval += tx_thread_create( thread_ptr, + retval += tx_thread_create(thread_ptr, "pthr", posix_thread_wrapper, - (ULONG)pthread_ptr, + (ULONG)(ALIGN_TYPE)pthread_ptr, pthread_ptr->stack_address, pthread_ptr->stack_size, (TX_LOWEST_PRIORITY - pthread_ptr->current_priority + 1), (TX_LOWEST_PRIORITY - pthread_ptr->threshold + 1), pthread_ptr->time_slice, TX_AUTO_START); - + + TX_THREAD_EXTENSION_PTR_SET(thread_ptr, pthread_ptr) + /* See if ThreadX encountered an error */ if (retval) { |
