Skip to content

work: add work_queue to core_context - #237

Merged
lgirdwood merged 1 commit into
thesofproject:nextfrom
tlauda:topic/work_queue_core_context
Aug 21, 2018
Merged

lgirdwood merged 1 commit into
thesofproject:nextfrom
tlauda:topic/work_queue_core_context

Conversation

@tlauda

@tlauda tlauda commented Aug 20, 2018

Copy link
Copy Markdown
Contributor

Implements work_queue per core by adding it to core_context.

Signed-off-by: Tomasz Lauda tomasz.lauda@linux.intel.com

Implements work_queue per core by adding it to core_context.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
#include <arch/cpu.h>
#include <sof/work.h>

struct work_queue **arch_work_queue_get(void)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we return a ** ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, could this be static inline ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. ** to be able to assign pointer per core using the same init function.
    It's the same as of other core_context members.
  2. It could be problematic as implementation is in .c files and for up needs to access static struct.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, not following 1. Are you saying there there would be differences to init function on each core without this ?

@tlauda

tlauda commented Aug 20, 2018

Copy link
Copy Markdown
Contributor Author

What I meant is that work queue init function assigns address to the work queue struct pointer (allocation on runtime heap). I'm returning pointer to a pointer to allow address assignment in a more conveniant way by using local variable.

@lgirdwood
lgirdwood merged commit cb5da1e into thesofproject:next Aug 21, 2018
@tlauda
tlauda deleted the topic/work_queue_core_context branch November 22, 2019 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants