Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/core/sys/posix/sched.d
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ version( CRuntime_Glibc )
enum SCHED_RR = 2;
//SCHED_SPORADIC (SS|TSP)
}
else version( CRuntime_Musl )
{
struct sched_param {
int sched_priority;
int sched_ss_low_priority;
timespec sched_ss_repl_period;
timespec sched_ss_init_budget;
int sched_ss_max_repl;
}
}
else version( Darwin )
{
enum SCHED_OTHER = 1;
Expand Down Expand Up @@ -206,6 +216,10 @@ else version (CRuntime_Bionic)
{
int sched_yield();
}
else version (CRuntime_Musl)
{
int sched_yield();
}
else
{
static assert(false, "Unsupported platform");
Expand Down Expand Up @@ -268,6 +282,12 @@ else version (CRuntime_Bionic)
int sched_get_priority_min(int);
int sched_rr_get_interval(pid_t, timespec*);
}
else version (CRuntime_Musl)
{
int sched_get_priority_max(int);
int sched_get_priority_min(int);
int sched_rr_get_interval(pid_t, timespec*);
}
else
{
static assert(false, "Unsupported platform");
Expand Down