MOS Source Code
Loading...
Searching...
No Matches
scheduler.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: GPL-3.0-or-later
2
3
#pragma once
4
5
#include "
mos/platform/platform.h
"
6
7
typedef
struct
_scheduler_ops
scheduler_ops_t
;
8
typedef
struct
_scheduler
scheduler_t
;
9
10
typedef
struct
_scheduler_ops
11
{
12
void
(*init)(
scheduler_t
*instance);
13
18
thread_t
*(*select_next)(
scheduler_t
*instance);
19
void
(*add_thread)(
scheduler_t
*instance,
thread_t
*thread);
20
void
(*remove_thread)(
scheduler_t
*instance,
thread_t
*thread);
21
}
scheduler_ops_t
;
22
23
typedef
struct
_scheduler
24
{
25
const
scheduler_ops_t
*
ops
;
26
}
scheduler_t
;
27
28
typedef
struct
_scheduler_info
29
{
30
const
char
*
const
name
;
31
scheduler_t
*
const
scheduler
;
32
}
scheduler_info_t
;
33
34
#define MOS_SCHEDULER(_name, _i) MOS_PUT_IN_SECTION(".mos.schedulers", scheduler_info_t, MOS_CONCAT(_name, __COUNTER__), { .name = #_name, .scheduler = &_i })
void
MOSAPI void(1, 2) fatal_abort(const char *fmt
platform.h
scheduler_ops_t
struct _scheduler_ops scheduler_ops_t
Definition
scheduler.h:7
scheduler_t
struct _scheduler scheduler_t
Definition
scheduler.h:8
scheduler_info_t
Definition
scheduler.h:29
scheduler_info_t::scheduler
scheduler_t *const scheduler
Definition
scheduler.h:31
scheduler_info_t::name
const char *const name
Definition
scheduler.h:30
scheduler_ops_t
Definition
scheduler.h:11
scheduler_t
Definition
scheduler.h:24
scheduler_t::ops
const scheduler_ops_t * ops
Definition
scheduler.h:25
thread_t
Definition
task_types.h:75
kernel
include
private
mos
tasks
scheduler.h
Generated on Sun Sep 1 2024 18:22:52 for MOS Source Code by
1.12.0