Skip to content

schedule: remove scheduler_restore()#10833

Open
kv2019i wants to merge 1 commit into
thesofproject:mainfrom
kv2019i:202606-sched-changes
Open

schedule: remove scheduler_restore()#10833
kv2019i wants to merge 1 commit into
thesofproject:mainfrom
kv2019i:202606-sched-changes

Conversation

@kv2019i
Copy link
Copy Markdown
Collaborator

@kv2019i kv2019i commented Jun 2, 2026

The last user of schedule_restore() was removed in commit 4f2e381 ("build: remove more XTOS left-overs"), so we can proceed it to remove it from schedule.h interface.

This will pave way for further simplications of the schedule.h interface now as the role of this interface is reduce to audio task scheduling, while low-level task scheduling is done in Zephyr.

Copilot AI review requested due to automatic review settings June 2, 2026 11:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes the (now-unused) scheduler “restore” hook from the schedule.h public scheduling interface, aligning the header with the ongoing shift of low-level task scheduling to Zephyr and keeping SOF’s scheduling API focused on audio task scheduling.

Changes:

  • Dropped scheduler_ops::scheduler_restore from struct scheduler_ops.
  • Removed the schedulers_restore() inline wrapper that iterated over registered schedulers.

Comment on lines 143 to 152
/**
* Frees scheduler's resources.
* @param data Private data of selected scheduler.
* @param flags Function specific flags.
* @return 0 if succeeded, error code otherwise.
*
* This operation is optional.
*/
void (*scheduler_free)(void *data, uint32_t flags);

/**
* Restores scheduler's resources.
* @param data Private data of selected scheduler.
* @return 0 if succeeded, error code otherwise.
*
* This operation is optional.
*/
int (*scheduler_restore)(void *data);
};
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in V2

Comment on lines 143 to 152
/**
* Frees scheduler's resources.
* @param data Private data of selected scheduler.
* @param flags Function specific flags.
* @return 0 if succeeded, error code otherwise.
*
* This operation is optional.
*/
void (*scheduler_free)(void *data, uint32_t flags);

/**
* Restores scheduler's resources.
* @param data Private data of selected scheduler.
* @return 0 if succeeded, error code otherwise.
*
* This operation is optional.
*/
int (*scheduler_restore)(void *data);
};
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in V3.

@lyakh
Copy link
Copy Markdown
Collaborator

lyakh commented Jun 2, 2026

one more

.scheduler_restore = NULL,

@kv2019i
Copy link
Copy Markdown
Collaborator Author

kv2019i commented Jun 2, 2026

V2 pushed:

  • include reference in src/schedule/ll_schedule_xtos.c

The last user of scheduler_restore() was removed in commit 4f2e381
("build: remove more XTOS left-overs"), so we can proceed it to remove
it from schedule.h interface.

This will pave way for further simplications of the schedule.h
interface now as the role of this interface is reduce to audio task
scheduling, while low-level task scheduling is done in Zephyr.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
@kv2019i kv2019i force-pushed the 202606-sched-changes branch from 3150381 to 28c3232 Compare June 2, 2026 11:49
@kv2019i
Copy link
Copy Markdown
Collaborator Author

kv2019i commented Jun 2, 2026

V3 pushed:

  • git commit reword only, no other changes

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.

3 participants