diff options
author | Florian Weimer <fweimer@redhat.com> | 2024-10-25 15:00:50 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2024-10-25 16:46:30 +0200 |
commit | 4f5f8343c3af0630b72a27e8a3adaa3ed006455d (patch) | |
tree | 5f8bc83607557c63520d002e41b6e410d4e4eba2 | |
parent | 6a290b2895b77be839fcb7c44a6a9879560097ad (diff) | |
download | glibc-4f5f8343c3af0630b72a27e8a3adaa3ed006455d.zip glibc-4f5f8343c3af0630b72a27e8a3adaa3ed006455d.tar.gz glibc-4f5f8343c3af0630b72a27e8a3adaa3ed006455d.tar.bz2 |
Linux: Match kernel text for SCHED_ macros
This avoids -Werror build issues in strace, which bundles UAPI
headers, but does not include them as system headers.
Fixes commit c444cc1d8335243c5c4e636d6a26c472df85522c
("Linux: Add missing scheduler constants to <sched.h>").
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/sched.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sysdeps/unix/sysv/linux/bits/sched.h b/sysdeps/unix/sysv/linux/bits/sched.h index a02cb69..f03f5f5 100644 --- a/sysdeps/unix/sysv/linux/bits/sched.h +++ b/sysdeps/unix/sysv/linux/bits/sched.h @@ -29,7 +29,7 @@ #define SCHED_FIFO 1 #define SCHED_RR 2 #ifdef __USE_GNU -# define SCHED_NORMAL SCHED_OTHER +# define SCHED_NORMAL 0 # define SCHED_BATCH 3 # define SCHED_ISO 4 # define SCHED_IDLE 5 @@ -48,8 +48,10 @@ #define SCHED_FLAG_UTIL_CLAMP_MAX 0x40 /* Combinations of sched_flags fields. */ -#define SCHED_FLAG_KEEP_ALL 0x18 -#define SCHED_FLAG_UTIL_CLAMP 0x60 +#define SCHED_FLAG_KEEP_ALL \ + (SCHED_FLAG_KEEP_POLICY | SCHED_FLAG_KEEP_PARAMS) +#define SCHED_FLAG_UTIL_CLAMP \ + (SCHED_FLAG_UTIL_CLAMP_MIN | SCHED_FLAG_UTIL_CLAMP_MAX) /* Use "" to work around incorrect macro expansion of the __has_include argument (GCC PR 80005). */ |