Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 747946
Collapse All | Expand All

(-)a/vboxdrv/r0drv/linux/memobj-r0drv-linux.c (+2 lines)
Lines 1181-1187 Link Here
1181
         */
1181
         */
1182
        else
1182
        else
1183
            rc = get_user_pages_remote(
1183
            rc = get_user_pages_remote(
1184
# if GET_USER_PAGES_API < KERNEL_VERSION(5, 9, 0)
1184
                                pTask,                  /* Task for fault accounting. */
1185
                                pTask,                  /* Task for fault accounting. */
1186
# endif
1185
                                pTask->mm,              /* Whose pages. */
1187
                                pTask->mm,              /* Whose pages. */
1186
                                R3Ptr,                  /* Where from. */
1188
                                R3Ptr,                  /* Where from. */
1187
                                cPages,                 /* How many pages. */
1189
                                cPages,                 /* How many pages. */
(-)a/vboxnetflt/r0drv/linux/the-linux-kernel.h (-1 / +5 lines)
Lines 137-143 Link Here
137
#include <linux/interrupt.h>
137
#include <linux/interrupt.h>
138
#include <linux/completion.h>
138
#include <linux/completion.h>
139
#include <linux/compiler.h>
139
#include <linux/compiler.h>
140
#ifndef HAVE_UNLOCKED_IOCTL /* linux/fs.h defines this */
140
/* linux/fs.h defines HAVE_UNLOCKED_IOCTL from 2.6.11 till 5.9, but its meaning remains valid */
141
#if RTLNX_VER_MIN(5,9,0)
142
# define HAVE_UNLOCKED_IOCTL 1
143
#endif
144
#if !defined(HAVE_UNLOCKED_IOCTL) && RTLNX_VER_MAX(2,6,38)
141
# include <linux/smp_lock.h>
145
# include <linux/smp_lock.h>
142
#endif
146
#endif
143
/* For the shared folders module */
147
/* For the shared folders module */
(-)a/vboxnetadp/r0drv/linux/the-linux-kernel.h (-1 / +5 lines)
Lines 137-143 Link Here
137
#include <linux/interrupt.h>
137
#include <linux/interrupt.h>
138
#include <linux/completion.h>
138
#include <linux/completion.h>
139
#include <linux/compiler.h>
139
#include <linux/compiler.h>
140
#ifndef HAVE_UNLOCKED_IOCTL /* linux/fs.h defines this */
140
/* linux/fs.h defines HAVE_UNLOCKED_IOCTL from 2.6.11 till 5.9, but its meaning remains valid */
141
#if RTLNX_VER_MIN(5,9,0)
142
# define HAVE_UNLOCKED_IOCTL 1
143
#endif
144
#if !defined(HAVE_UNLOCKED_IOCTL) && RTLNX_VER_MAX(2,6,38)
141
# include <linux/smp_lock.h>
145
# include <linux/smp_lock.h>
142
#endif
146
#endif
143
/* For the shared folders module */
147
/* For the shared folders module */
(-)a/vboxdrv/r0drv/linux/the-linux-kernel.h (-1 / +5 lines)
Lines 137-143 Link Here
137
#include <linux/interrupt.h>
137
#include <linux/interrupt.h>
138
#include <linux/completion.h>
138
#include <linux/completion.h>
139
#include <linux/compiler.h>
139
#include <linux/compiler.h>
140
#ifndef HAVE_UNLOCKED_IOCTL /* linux/fs.h defines this */
140
/* linux/fs.h defines HAVE_UNLOCKED_IOCTL from 2.6.11 till 5.9, but its meaning remains valid */
141
#if RTLNX_VER_MIN(5,9,0)
142
# define HAVE_UNLOCKED_IOCTL 1
143
#endif
144
#if !defined(HAVE_UNLOCKED_IOCTL) && RTLNX_VER_MAX(2,6,38)
141
# include <linux/smp_lock.h>
145
# include <linux/smp_lock.h>
142
#endif
146
#endif
143
/* For the shared folders module */
147
/* For the shared folders module */
(-)a/vboxdrv/r0drv/linux/thread2-r0drv-linux.c (-34 / +27 lines)
Lines 54-104 Link Here
54
54
55
DECLHIDDEN(int) rtThreadNativeSetPriority(PRTTHREADINT pThread, RTTHREADTYPE enmType)
55
DECLHIDDEN(int) rtThreadNativeSetPriority(PRTTHREADINT pThread, RTTHREADTYPE enmType)
56
{
56
{
57
#if RTLNX_VER_MIN(2,6,11)
57
    int                 iSchedClass = SCHED_FIFO;
58
    /* See comment near MAX_RT_PRIO in linux/sched.h for details on
58
    int                 rc = VINF_SUCCESS;
59
       sched_priority. */
59
    struct sched_param  Param = { 0 };
60
    int                 iSchedClass = SCHED_NORMAL;
60
61
    struct sched_param  Param       = { .sched_priority = MAX_PRIO - 1 };
61
    RT_NOREF_PV(pThread);
62
#if RTLNX_VER_MIN(5,9,0)
63
    RT_NOREF_PV(iSchedClass);
64
    RT_NOREF_PV(Param);
65
#endif
62
    switch (enmType)
66
    switch (enmType)
63
    {
67
    {
64
        case RTTHREADTYPE_INFREQUENT_POLLER:
65
            Param.sched_priority = MAX_RT_PRIO + 5;
66
            break;
67
68
        case RTTHREADTYPE_EMULATION:
69
            Param.sched_priority = MAX_RT_PRIO + 4;
70
            break;
71
72
        case RTTHREADTYPE_DEFAULT:
73
            Param.sched_priority = MAX_RT_PRIO + 3;
74
            break;
75
76
        case RTTHREADTYPE_MSG_PUMP:
77
            Param.sched_priority = MAX_RT_PRIO + 2;
78
            break;
79
80
        case RTTHREADTYPE_IO:
68
        case RTTHREADTYPE_IO:
81
            iSchedClass = SCHED_FIFO;
69
#if RTLNX_VER_MAX(5,9,0)
70
            /* Set max. priority to preempt all other threads on this CPU. */
82
            Param.sched_priority = MAX_RT_PRIO - 1;
71
            Param.sched_priority = MAX_RT_PRIO - 1;
72
#else 
73
            /* Effectively changes prio to 50 */
74
            sched_set_fifo(current);
75
#endif
83
            break;
76
            break;
84
85
        case RTTHREADTYPE_TIMER:
77
        case RTTHREADTYPE_TIMER:
86
            iSchedClass = SCHED_FIFO;
78
#if RTLNX_VER_MAX(5,9,0)
87
            Param.sched_priority = 1; /* not 0 just in case */
79
            Param.sched_priority = 1; /* not 0 just in case */
80
#else
81
            /* Just one above SCHED_NORMAL class */
82
            sched_set_fifo_low(current);
83
#endif
88
            break;
84
            break;
89
90
        default:
85
        default:
91
            AssertMsgFailed(("enmType=%d\n", enmType));
86
            /* pretend success instead of VERR_NOT_SUPPORTED */
92
            return VERR_INVALID_PARAMETER;
87
            return rc;
88
    }
89
#if RTLNX_VER_MAX(5,9,0)
90
    if ((sched_setscheduler(current, iSchedClass, &Param)) != 0) {
91
        rc = VERR_GENERAL_FAILURE;
93
    }
92
    }
94
95
    sched_setscheduler(current, iSchedClass, &Param);
96
#else
97
    RT_NOREF_PV(enmType);
98
#endif
93
#endif
99
    RT_NOREF_PV(pThread);
94
    return rc;
100
101
    return VINF_SUCCESS;
102
}
95
}
103
96
104
97

Return to bug 747946