File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -276,8 +276,8 @@ void am_ao_state_ctor(const struct am_ao_state_cfg *cfg) {
276276
277277 am_pal_ctor (/*arg=*/ NULL );
278278
279- me -> startup_mutex = am_pal_mutex_create ();
280- am_pal_mutex_lock (me -> startup_mutex );
279+ me -> startup_complete_mutex = am_pal_mutex_create ();
280+ am_pal_mutex_lock (me -> startup_complete_mutex );
281281 me -> startup_complete = false;
282282
283283 me -> debug = cfg -> debug ;
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ bool am_ao_run_all(void) {
7777 }
7878
7979 if (AM_UNLIKELY (!me -> startup_complete )) {
80- am_pal_mutex_unlock (me -> startup_mutex );
80+ am_pal_mutex_unlock (me -> startup_complete_mutex );
8181 me -> startup_complete = true;
8282 }
8383
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ bool am_ao_run_all(void) {
8383
8484 if (!me -> startup_complete ) {
8585 /* start all AOs */
86- am_pal_mutex_unlock (me -> startup_mutex );
86+ am_pal_mutex_unlock (me -> startup_complete_mutex );
8787 me -> startup_complete = true;
8888 }
8989 /* wait all AOs to complete */
@@ -190,8 +190,8 @@ void am_ao_notify_unsafe(const struct am_ao *ao) { am_ao_notify(ao); }
190190
191191void am_ao_wait_start_all (void ) {
192192 const struct am_ao_state * me = & am_ao_state_ ;
193- am_pal_mutex_lock (me -> startup_mutex );
194- am_pal_mutex_unlock (me -> startup_mutex );
193+ am_pal_mutex_lock (me -> startup_complete_mutex );
194+ am_pal_mutex_unlock (me -> startup_complete_mutex );
195195}
196196
197197int am_ao_get_own_prio (void ) {
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ struct am_ao_state {
5454 /** Number of runnings AOs */
5555 int aos_cnt ;
5656 /** Ensure simultaneous start of all active objects. */
57- int startup_mutex ;
57+ int startup_complete_mutex ;
5858 /** User callback on idle state, when no AO is running. */
5959 void (* on_idle )(void );
6060 /** Debug callback. */
You can’t perform that action at this time.
0 commit comments