summaryrefslogtreecommitdiff
path: root/utility/rtos_compatibility_layers/posix/px_px_initialize.c
diff options
context:
space:
mode:
authorFrédéric Desbiens <[email protected]>2026-03-06 19:27:49 +0100
committerGitHub <[email protected]>2026-03-06 19:27:49 +0100
commit3726d7906b4808bfec7855fc088e073199df9120 (patch)
tree8789bfd03d1d49e1967e80d04aa4ff606fda43eb /utility/rtos_compatibility_layers/posix/px_px_initialize.c
parent4b6e8100d932a3a67b34c6eb17f84f3bffb9e2ae (diff)
parentc3259a216026372e3833dd8996a68f77e8595fbd (diff)
Merge pull request #510 from eclipse-threadx/devv6.5.0.202601_rel
Merge changes ahead of the v6.5.0.202601 release
Diffstat (limited to 'utility/rtos_compatibility_layers/posix/px_px_initialize.c')
-rw-r--r--utility/rtos_compatibility_layers/posix/px_px_initialize.c49
1 files changed, 22 insertions, 27 deletions
diff --git a/utility/rtos_compatibility_layers/posix/px_px_initialize.c b/utility/rtos_compatibility_layers/posix/px_px_initialize.c
index 94ea3a06..0ad147a0 100644
--- a/utility/rtos_compatibility_layers/posix/px_px_initialize.c
+++ b/utility/rtos_compatibility_layers/posix/px_px_initialize.c
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** POSIX wrapper for THREADX */
+/** */
+/** POSIX wrapper for THREADX */
/** */
/** */
/** */
@@ -27,8 +28,8 @@
/**************************************************************************/
/**************************************************************************/
-/** */
-/** POSIX wrapper for THREADX */
+/** */
+/** POSIX wrapper for THREADX */
/** */
/** */
/** */
@@ -77,12 +78,6 @@
/* */
/* POSIX internal code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 William E. Lamie Initial Version 6.1.7 */
-/* */
/**************************************************************************/
static VOID posix_memory_init(VOID * posix_heap_ptr)
{
@@ -94,7 +89,7 @@ INT retval;
retval = tx_byte_pool_create((TX_BYTE_POOL *)&posix_heap_byte_pool,
"POSIX HEAP",
posix_heap_ptr,
- POSIX_HEAP_SIZE_IN_BYTES);
+ POSIX_HEAP_SIZE_IN_BYTES);
/* Make sure the byte pool was created successfully. */
if (retval)
@@ -146,11 +141,11 @@ INT retval;
static VOID posix_semaphore_init(VOID)
{
-ULONG i;
-sem_t *sem_ptr;
+ULONG i;
+sem_t *sem_ptr;
/* Start at the front of the pool. */
- sem_ptr = &(posix_sem_pool[0]);
+ sem_ptr = &(posix_sem_pool[0]);
for (i = 0; i < SEM_NSEMS_MAX; i++, sem_ptr++)
{
@@ -219,20 +214,20 @@ VOID *posix_initialize(VOID * posix_memory)
UCHAR *pointer;
- /* Setup temporary memory pointer, so we can start allocating
- space for the posix data structures. The important thing to
+ /* Setup temporary memory pointer, so we can start allocating
+ space for the posix data structures. The important thing to
remember here is that the system thread's stack, the region0
memory, and the queue are allocated sequentially from the
address specified by posix_memory. */
pointer = (UCHAR *)posix_memory;
-
- /* Start up the System Manager thread. */
+
+ /* Start up the System Manager thread. */
tx_thread_create(&posix_system_manager, "POSIX System Manager", posix_system_manager_entry,
0, pointer, POSIX_SYSTEM_STACK_SIZE,
SYSMGR_PRIORITY, SYSMGR_THRESHOLD,
- TX_NO_TIME_SLICE, TX_AUTO_START);
-
+ TX_NO_TIME_SLICE, TX_AUTO_START);
+
pointer = pointer + POSIX_SYSTEM_STACK_SIZE;
/* Set up a memory "heap" used internally by the POSIX. */
@@ -243,11 +238,11 @@ UCHAR *pointer;
/* Create the work item message queue. */
tx_queue_create(&posix_work_queue, "POSIX work queue", WORK_REQ_SIZE,
pointer, WORK_QUEUE_DEPTH*WORK_REQ_SIZE);
-
+
pointer = pointer + (WORK_QUEUE_DEPTH * WORK_REQ_SIZE);
- /* Initialize static pool of pthreads Control blocks. */
- posix_pthread_init();
+ /* Initialize static pool of pthreads Control blocks. */
+ posix_pthread_init();
/* Create a default pthread_attr */
set_default_pthread_attr(&posix_default_pthread_attr);
@@ -264,7 +259,7 @@ UCHAR *pointer;
/* Set up a pool of semaphores used internally by the POSIX. */
posix_semaphore_init();
#endif
-
+
/* Create a default mutex_attr */
set_default_mutexattr(&posix_default_mutex_attr);