forked from thesofproject/sof
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschedule.h
More file actions
43 lines (36 loc) · 1.12 KB
/
schedule.h
File metadata and controls
43 lines (36 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright(c) 2016 Intel Corporation. All rights reserved.
*
* Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
* Keyon Jie <yang.jie@linux.intel.com>
*/
#ifndef __SOF_IPC_SCHEDULE_H__
#define __SOF_IPC_SCHEDULE_H__
#include <rtos/task.h>
#include <rtos/sof.h>
#include <stdbool.h>
#include <stdint.h>
/** \brief Scheduling period for IPC task in microseconds. */
#define IPC_PERIOD_USEC 100
struct ipc;
/**
* \brief Get IPC command processing deadline.
* @param data Task structure.
*/
static inline uint64_t ipc_task_deadline(void *data)
{
/* TODO: Currently it's a workaround to execute IPC tasks ASAP.
* In the future IPCs should have a cycle budget and deadline
* should be calculated based on that value. This means every
* IPC should have its own maximum number of cycles that is required
* to finish processing. This will allow us to calculate task deadline.
*/
return SOF_TASK_DEADLINE_NOW;
}
/**
* \brief Schedule processing of the next IPC command from host.
* @param ipc The global IPC context.
*/
void ipc_schedule_process(struct ipc *ipc);
#endif