Skip to content

Commit 7f5a9c2

Browse files
committed
Prune struct am_ao::init_event pointer as unused
1 parent 139cdf5 commit 7f5a9c2

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [0-based versioning](https://0ver.org/).
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- Prune `struct am_ao::init_event` pointer as unused.
13+
1014
### Added
1115

1216
- Watchdog example

libs/ao/ao.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,6 @@ struct am_ao {
101101
struct am_event_queue event_queue; /**< event queue */
102102
int last_event; /**< last processed event */
103103
int task_id; /**< task handle */
104-
/** initial user event - the parameter of am_ao_start() API */
105-
const struct am_event *init_event;
106104
/** AO priority */
107105
struct am_ao_prio prio;
108106
/** safety net to catch missing am_ao_ctor() call */

libs/ao/cooperative/port.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,14 @@ void am_ao_start(
128128
ao->prio = prio;
129129
ao->name = name;
130130
ao->task_id = am_pal_task_get_own_id();
131-
ao->init_event = init_event;
132131

133132
struct am_ao_state *me = &am_ao_state_;
134133
AM_ASSERT(NULL == me->aos[prio.ao]);
135134
me->aos[prio.ao] = ao;
136135
++me->aos_cnt;
137136

138137
me->running_ao_prio = prio;
139-
am_hsm_init(&ao->hsm, ao->init_event);
138+
am_hsm_init(&ao->hsm, init_event);
140139
me->running_ao_prio = AM_AO_PRIO_INVALID;
141140
}
142141

libs/ao/preemptive/port.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ void am_ao_start(
105105

106106
ao->prio = prio;
107107
ao->name = name;
108-
ao->init_event = init_event;
109108

110109
struct am_ao_state *me = &am_ao_state_;
111110
AM_ASSERT(NULL == me->aos[prio.ao]);

0 commit comments

Comments
 (0)