summaryrefslogtreecommitdiff
path: root/utility/benchmarks/thread_metric/tm_porting_layer_template.c
diff options
context:
space:
mode:
Diffstat (limited to 'utility/benchmarks/thread_metric/tm_porting_layer_template.c')
-rw-r--r--utility/benchmarks/thread_metric/tm_porting_layer_template.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/utility/benchmarks/thread_metric/tm_porting_layer_template.c b/utility/benchmarks/thread_metric/tm_porting_layer_template.c
index c0460802..fcbc59a8 100644
--- a/utility/benchmarks/thread_metric/tm_porting_layer_template.c
+++ b/utility/benchmarks/thread_metric/tm_porting_layer_template.c
@@ -1,16 +1,17 @@
/***************************************************************************
- * 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
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
+/** */
/** Thread-Metric Component */
/** */
/** Porting Layer (Must be completed with RTOS specifics) */
@@ -24,7 +25,7 @@
#include "tm_api.h"
-/* This function called from main performs basic RTOS initialization,
+/* This function called from main performs basic RTOS initialization,
calls the test initialization function, and then starts the RTOS function. */
void tm_initialize(void (*test_initialization_function)(void))
{
@@ -33,8 +34,8 @@ void tm_initialize(void (*test_initialization_function)(void))
/* This function takes a thread ID and priority and attempts to create the
- file in the underlying RTOS. Valid priorities range from 1 through 31,
- where 1 is the highest priority and 31 is the lowest. If successful,
+ file in the underlying RTOS. Valid priorities range from 1 through 31,
+ where 1 is the highest priority and 31 is the lowest. If successful,
the function should return TM_SUCCESS. Otherwise, TM_ERROR should be returned. */
int tm_thread_create(int thread_id, int priority, void (*entry_function)(void))
{
@@ -67,7 +68,7 @@ void tm_thread_relinquish(void)
/* This function suspends the specified thread for the specified number
- of seconds. If successful, the function should return TM_SUCCESS.
+ of seconds. If successful, the function should return TM_SUCCESS.
Otherwise, TM_ERROR should be returned. */
void tm_thread_sleep(int seconds)
{
@@ -83,7 +84,7 @@ int tm_queue_create(int queue_id)
}
-/* This function sends a 16-byte message to the specified queue. If successful,
+/* This function sends a 16-byte message to the specified queue. If successful,
the function should return TM_SUCCESS. Otherwise, TM_ERROR should be returned. */
int tm_queue_send(int queue_id, unsigned long *message_ptr)
{
@@ -91,7 +92,7 @@ int tm_queue_send(int queue_id, unsigned long *message_ptr)
}
-/* This function receives a 16-byte message from the specified queue. If successful,
+/* This function receives a 16-byte message from the specified queue. If successful,
the function should return TM_SUCCESS. Otherwise, TM_ERROR should be returned. */
int tm_queue_receive(int queue_id, unsigned long *message_ptr)
{
@@ -132,8 +133,8 @@ int tm_memory_pool_create(int pool_id)
}
-/* This function allocates a 128 byte block from the specified memory pool.
- If successful, the function should return TM_SUCCESS. Otherwise, TM_ERROR
+/* This function allocates a 128 byte block from the specified memory pool.
+ If successful, the function should return TM_SUCCESS. Otherwise, TM_ERROR
should be returned. */
int tm_memory_pool_allocate(int pool_id, unsigned char **memory_ptr)
{
@@ -141,8 +142,8 @@ int tm_memory_pool_allocate(int pool_id, unsigned char **memory_ptr)
}
-/* This function releases a previously allocated 128 byte block from the specified
- memory pool. If successful, the function should return TM_SUCCESS. Otherwise, TM_ERROR
+/* This function releases a previously allocated 128 byte block from the specified
+ memory pool. If successful, the function should return TM_SUCCESS. Otherwise, TM_ERROR
should be returned. */
int tm_memory_pool_deallocate(int pool_id, unsigned char *memory_ptr)
{