kernel/poll: Use a separate thread backpointer for triggered work

The triggered work scheme uses a trick where it overloads the thread
pointer field of the struct poller (which normally stores the ID of
the thread that is blocked in k_poll()) to be able to find the work
queue to which it will submit.

Give it its own pointer field to break this false dependency.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
Andy Ross 2020-11-05 11:50:47 -08:00 committed by Anas Nashif
commit 6c82745cb3
2 changed files with 15 additions and 7 deletions

View file

@ -2766,6 +2766,7 @@ struct k_delayed_work {
struct k_work_poll {
struct k_work work;
struct _poller poller;
struct k_thread *thread;
struct k_poll_event *events;
int num_events;
k_work_handler_t real_handler;