Skip to content

Commit 8c0c11b

Browse files
lyakhlgirdwood
authored andcommitted
schedule: (cosmetic) clarify arch_*schedulers_get()
Both arch_schedulers_get() and arch_user_schedulers_get() should only be called from the privileged context. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent b45223e commit 8c0c11b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

zephyr/schedule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ static APP_SYSUSER_BSS struct schedulers *_u_schedulers[CONFIG_CORE_COUNT];
3333
*/
3434
struct schedulers **arch_schedulers_get(void)
3535
{
36-
#if CONFIG_SOF_USERSPACE_LL
37-
/* user-space callers must use arch_user_schedulers_get() */
36+
#ifdef __ZEPHYR__
3837
assert(!k_is_user_context());
3938
#endif
4039
return _k_schedulers + cpu_get_id();
@@ -53,6 +52,7 @@ EXPORT_SYMBOL(arch_schedulers_get);
5352
struct schedulers **arch_user_schedulers_get(void)
5453
{
5554
#ifdef CONFIG_SOF_USERSPACE_LL
55+
assert(!k_is_user_context());
5656
return _u_schedulers + cpu_get_id();
5757
#else
5858
return NULL;

0 commit comments

Comments
 (0)