svn commit: r364665 - stable/12/sys/compat/linux
Edward Tomasz Napierala
trasz at FreeBSD.org
Mon Aug 24 12:47:21 UTC 2020
Author: trasz
Date: Mon Aug 24 12:47:20 2020
New Revision: 364665
URL: https://svnweb.freebsd.org/changeset/base/364665
Log:
MFC r358673 by tijl:
Move compat.linux.map_sched_prio sysctl definition to linux_mib.c so it is
only defined by linux_common kernel module and not both linux and linux64
modules.
Reported by: Yuri Pankov <ypankov at fastmail.com>
Modified:
stable/12/sys/compat/linux/linux_mib.c
stable/12/sys/compat/linux/linux_mib.h
stable/12/sys/compat/linux/linux_misc.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/compat/linux/linux_mib.c
==============================================================================
--- stable/12/sys/compat/linux/linux_mib.c Mon Aug 24 12:43:54 2020 (r364664)
+++ stable/12/sys/compat/linux/linux_mib.c Mon Aug 24 12:47:20 2020 (r364665)
@@ -70,6 +70,11 @@ int linux_preserve_vstatus = 0;
SYSCTL_INT(_compat_linux, OID_AUTO, preserve_vstatus, CTLFLAG_RWTUN,
&linux_preserve_vstatus, 0, "Preserve VSTATUS termios(4) flag");
+bool linux_map_sched_prio = true;
+SYSCTL_BOOL(_compat_linux, OID_AUTO, map_sched_prio, CTLFLAG_RDTUN,
+ &linux_map_sched_prio, 0, "Map scheduler priorities to Linux priorities "
+ "(not POSIX compliant)");
+
static int linux_set_osname(struct thread *td, char *osname);
static int linux_set_osrelease(struct thread *td, char *osrelease);
static int linux_set_oss_version(struct thread *td, int oss_version);
Modified: stable/12/sys/compat/linux/linux_mib.h
==============================================================================
--- stable/12/sys/compat/linux/linux_mib.h Mon Aug 24 12:43:54 2020 (r364664)
+++ stable/12/sys/compat/linux/linux_mib.h Mon Aug 24 12:47:20 2020 (r364665)
@@ -64,5 +64,6 @@ int linux_kernver(struct thread *td);
extern int linux_ignore_ip_recverr;
extern int linux_preserve_vstatus;
+extern bool linux_map_sched_prio;
#endif /* _LINUX_MIB_H_ */
Modified: stable/12/sys/compat/linux/linux_misc.c
==============================================================================
--- stable/12/sys/compat/linux/linux_misc.c Mon Aug 24 12:43:54 2020 (r364664)
+++ stable/12/sys/compat/linux/linux_misc.c Mon Aug 24 12:47:20 2020 (r364665)
@@ -143,11 +143,6 @@ struct l_pselect6arg {
l_size_t ss_len;
};
-static bool map_sched_prio = true;
-SYSCTL_BOOL(_compat_linux, OID_AUTO, map_sched_prio, CTLFLAG_RDTUN,
- &map_sched_prio, 0, "Map scheduler priorities to Linux priorities "
- "(not POSIX compliant)");
-
static int linux_utimensat_nsec_valid(l_long);
@@ -1591,7 +1586,7 @@ linux_sched_setscheduler(struct thread *td,
if (error)
return (error);
- if (map_sched_prio) {
+ if (linux_map_sched_prio) {
switch (policy) {
case SCHED_OTHER:
if (sched_param.sched_priority != 0)
@@ -1671,7 +1666,7 @@ linux_sched_get_priority_max(struct thread *td,
printf(ARGS(sched_get_priority_max, "%d"), args->policy);
#endif
- if (map_sched_prio) {
+ if (linux_map_sched_prio) {
switch (args->policy) {
case LINUX_SCHED_OTHER:
td->td_retval[0] = 0;
@@ -1712,7 +1707,7 @@ linux_sched_get_priority_min(struct thread *td,
printf(ARGS(sched_get_priority_min, "%d"), args->policy);
#endif
- if (map_sched_prio) {
+ if (linux_map_sched_prio) {
switch (args->policy) {
case LINUX_SCHED_OTHER:
td->td_retval[0] = 0;
@@ -2198,7 +2193,7 @@ linux_sched_setparam(struct thread *td,
if (tdt == NULL)
return (ESRCH);
- if( map_sched_prio ) {
+ if (linux_map_sched_prio) {
error = kern_sched_getscheduler(td, tdt, &policy);
if (error)
goto out;
@@ -2259,7 +2254,7 @@ linux_sched_getparam(struct thread *td,
return (error);
}
- if (map_sched_prio) {
+ if (linux_map_sched_prio) {
error = kern_sched_getscheduler(td, tdt, &policy);
PROC_UNLOCK(tdt->td_proc);
if (error)
More information about the svn-src-all
mailing list