diff options
author | Florian Weimer <fweimer@redhat.com> | 2024-09-11 10:05:08 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2024-09-11 10:05:08 +0200 |
commit | c444cc1d8335243c5c4e636d6a26c472df85522c (patch) | |
tree | d547766d0371410436226f380c028cbef1b28826 /sysdeps/unix/sysv/linux/bits | |
parent | 21571ca0d70302909cf72707b2a7736cf12190a0 (diff) | |
download | glibc-c444cc1d8335243c5c4e636d6a26c472df85522c.zip glibc-c444cc1d8335243c5c4e636d6a26c472df85522c.tar.gz glibc-c444cc1d8335243c5c4e636d6a26c472df85522c.tar.bz2 |
Linux: Add missing scheduler constants to <sched.h>
And add a test, misc/tst-sched-consts, that checks
consistency with <sched.h>.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps/unix/sysv/linux/bits')
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/sched.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/bits/sched.h b/sysdeps/unix/sysv/linux/bits/sched.h index e5b7efb..a02cb69 100644 --- a/sysdeps/unix/sysv/linux/bits/sched.h +++ b/sysdeps/unix/sysv/linux/bits/sched.h @@ -29,6 +29,7 @@ #define SCHED_FIFO 1 #define SCHED_RR 2 #ifdef __USE_GNU +# define SCHED_NORMAL SCHED_OTHER # define SCHED_BATCH 3 # define SCHED_ISO 4 # define SCHED_IDLE 5 @@ -37,6 +38,19 @@ /* Flags that can be used in policy values. */ # define SCHED_RESET_ON_FORK 0x40000000 +/* Flags for the sched_flags field in struct sched_attr. */ +#define SCHED_FLAG_RESET_ON_FORK 0x01 +#define SCHED_FLAG_RECLAIM 0x02 +#define SCHED_FLAG_DL_OVERRUN 0x04 +#define SCHED_FLAG_KEEP_POLICY 0x08 +#define SCHED_FLAG_KEEP_PARAMS 0x10 +#define SCHED_FLAG_UTIL_CLAMP_MIN 0x20 +#define SCHED_FLAG_UTIL_CLAMP_MAX 0x40 + +/* Combinations of sched_flags fields. */ +#define SCHED_FLAG_KEEP_ALL 0x18 +#define SCHED_FLAG_UTIL_CLAMP 0x60 + /* Use "" to work around incorrect macro expansion of the __has_include argument (GCC PR 80005). */ # ifdef __has_include |