-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix userallocatedevent imp #12319
Fix userallocatedevent imp #12319
Conversation
@maciejbocianski, thank you for your changes. |
events/source/equeue.c
Outdated
@@ -402,6 +404,10 @@ void equeue_post_user_allocated(equeue_t *q, void (*cb)(void *), void *p) | |||
unsigned tick = equeue_tick(); | |||
e->cb = cb; | |||
e->target = tick + e->target; | |||
// for user allocated events use event id to track event state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is not very readable, can we use some kind of enum maybe? So we don't introduce magic numbers. Also are you sure that hijacking of this fields is ok (to be fair i'm not 100% sure how it's being used)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, I will use enum.
Hijacking id
field should be OK - all user_allocated
equeue
APIs (and whole equeue implementation) use event address instead event id
when dealing with user allocated events.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -260,17 +262,22 @@ class UserAllocatedEvent<F, void(ArgTs...)> { | |||
return false; | |||
} | |||
core_util_atomic_incr_u8(&_post_ref, 1); | |||
equeue_event_delay(&_e + 1, _delay); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that changes the behavior? As before we could change delay and period of already posted events?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wasn't allowed previously. It was guarded by MBED_ASSERT(!_post_ref)
.
It isn't a valid use case to change delay/period while dispatching is ongoing.
37b2ad1
to
1f9b5de
Compare
PR was updated, please review |
CI started |
Test run: FAILEDSummary: 2 of 4 test jobs failed Failed test jobs:
|
not related - problems with IAR licence,
|
Ci restarted |
Test run: FAILEDSummary: 1 of 4 test jobs failed Failed test jobs:
|
Java error, restarted |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
There was one more CI job created 👀 |
Test run: FAILEDSummary: 1 of 11 test jobs failed Failed test jobs:
|
Ci completed, reviews required |
This ran through ci 22 days ago so needs to be re-run |
Test run: FAILEDSummary: 1 of 7 test jobs failed Failed test jobs:
|
Client restarted |
Summary of changes
Fix user allocated events implementation:
delay
andperiod
insideUserAllocatedEvent
and set it at every postImpact of changes
Migration actions required
Documentation
Pull request type
Test results
Reviewers
@jamesbeyond @kjbracey-arm