Skip to content

Commit 4555d75

Browse files
committed
schedule: zephyr_ll: add zephyr_ll_grant_access()
Add function zephyr_ll_grant_access() to allow other threads to access the scheduler mutex. This is needed if work is submitted from other threads to the scheduler. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
1 parent 84b7699 commit 4555d75

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

src/include/sof/schedule/ll_schedule_domain.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ struct task *zephyr_ll_task_alloc(void);
102102
void zephyr_ll_task_free(struct task *task);
103103
struct k_heap *zephyr_ll_user_heap(void);
104104
void zephyr_ll_user_resources_init(void);
105+
void zephyr_ll_grant_access(struct k_thread *thread);
105106
#endif /* CONFIG_SOF_USERSPACE_LL */
106107

107108
static inline struct ll_schedule_domain *domain_init

src/schedule/zephyr_ll.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,13 @@ void zephyr_ll_task_free(struct task *task)
539539
sof_heap_free(zephyr_ll_user_heap(), task);
540540
}
541541

542+
void zephyr_ll_grant_access(struct k_thread *thread)
543+
{
544+
struct zephyr_ll *ll_sch = (struct zephyr_ll *)scheduler_get_data(SOF_SCHEDULE_LL_TIMER);
545+
546+
k_thread_access_grant(thread, ll_sch->lock);
547+
}
548+
542549
#endif /* CONFIG_SOF_USERSPACE_LL */
543550

544551
int zephyr_ll_task_init(struct task *task,

0 commit comments

Comments
 (0)