Skip to content

Commit 37dace4

Browse files
committed
Use the term task instead of thread
1 parent 4c2a0fe commit 37dace4

File tree

7 files changed

+14
-18
lines changed

7 files changed

+14
-18
lines changed

libs/ao/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Overview
77

88
The Active Object (AO) module provides a framework for implementing the Active
99
Object design pattern in embedded systems and other concurrent environments. It
10-
facilitates the encapsulation of threads, event-driven state machines, and
10+
facilitates the encapsulation of tasks, event-driven state machines, and
1111
message queues to enable asynchronous communication and cooperative
1212
multitasking.
1313

libs/ao/ao.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,8 +580,8 @@ void am_ao_log_last_events(void (*log)(const char *name, int event));
580580
* Prevents using active objects before they are ready to
581581
* process events.
582582
*
583-
* To be run once at the start of regular (non-AO) user threads created with
584-
* am_pal_task_create() API. These regular user thread are typically
583+
* To be run once at the start of regular (non-AO) user tasks created with
584+
* am_pal_task_create() API. These regular user tasks are typically
585585
* used to execute blocking calls and post/publish events to active objects.
586586
*/
587587
void am_ao_wait_start_all(void);

libs/event/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ Please note that the following pseudocode is incorrect:
167167
am_ao_post_fifo(ao2, event);
168168
169169
This is because event could become invalid after posting it to `ao`.
170-
Consider the case when `ao1` preempts the execution thread executing the code above
170+
Consider the case when `ao1` preempts the execution task executing the code above
171171
(let's call it `ao0`) once the event is posted to `ao1`.
172172
Then `ao1` consumes the event, decrements the event's reference counter and frees the event.
173173
After that `ao0` resumes the execution and tries to post the already freed event

libs/pal/freertos/pal.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,8 @@
3333
#include "pal/pal.h"
3434

3535
struct am_pal_task {
36-
/* pthread data */
36+
/* task data */
3737
static StaticTask_t task;
38-
/* mutex to protect condition variable */
39-
pthread_mutex_t mutex;
40-
/* condition variable for signaling */
41-
pthread_cond_t cond;
4238
/* flag to track notification state */
4339
bool notified;
4440
/* the task is valid */

libs/pal/pal.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
#define AM_PAL_TICK_DOMAIN_DEFAULT 0
5050

5151
#ifndef AM_PAL_TICK_DOMAIN_MAX
52-
#define AM_PAL_TICK_DOMAIN_MAX 1 /**< total number of tick domains */
52+
#define AM_PAL_TICK_DOMAIN_MAX 1 /**< Total number of tick domains. */
5353
#endif
5454

5555
#ifdef __cplusplus
@@ -92,10 +92,10 @@ int am_pal_mutex_create(void);
9292
/**
9393
* Lock mutex.
9494
*
95-
* If the mutex is locked by another thread,
96-
* the calling thread waits until the mutex becomes available.
95+
* If the mutex is locked by another task,
96+
* the calling task waits until the mutex becomes available.
9797
*
98-
* A thread is not permitted to lock a mutex it has already locked.
98+
* A task is not permitted to lock a mutex it has already locked.
9999
*
100100
* May not be called from ISRs.
101101
*
@@ -107,10 +107,10 @@ void am_pal_mutex_lock(int mutex);
107107
* Unlock mutex.
108108
*
109109
* The mutex must already be locked with am_pal_mutex_lock()
110-
* by the calling thread.
110+
* by the calling task.
111111
*
112-
* The mutex cannot be claimed by another thread until it has been
113-
* unlocked by the calling thread.
112+
* The mutex cannot be claimed by another task until it has been
113+
* unlocked by the calling task.
114114
*
115115
* Mutexes may not be unlocked in ISRs.
116116
*

libs/timer/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Key Features
2828
3. **Thread Safety**:
2929

3030
- Critical sections managed using user-defined enter/exit callbacks.
31-
- Safe timer operations across concurrent threads.
31+
- Safe timer operations across concurrent tasks.
3232

3333
4. **Dynamic and Static Timer Allocation**:
3434

libs/timer/timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ struct am_timer_state {
5656
*
5757
* This is done to limit struct am_timer::domains[] list operations
5858
* exclusively to am_timer_tick() call to avoid race conditions
59-
* between timer owners the ticker thread/ISR.
59+
* between timer owners the ticker task/ISR.
6060
*/
6161
struct am_slist domains_pend[AM_PAL_TICK_DOMAIN_MAX];
6262
/** timer library configuration */

0 commit comments

Comments
 (0)