summaryrefslogtreecommitdiff
path: root/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-semeventmulti-r0drv-freebsd.c
blob: f5db6a393cf7f75a595e5efe965e6c4fe4779840 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Index: src/VBox/Runtime/r0drv/freebsd/semeventmulti-r0drv-freebsd.c
@@ -215,15 +215,23 @@ static int rtSemEventMultiWait(RTSEMEVEN
 
                 RTSpinlockRelease(pEventMultiInt->hSpinLock, &Tmp);
 
+#if __FreeBSD_version >=800026
                 if (fInterruptible)
                     rc = sleepq_timedwait_sig(pEventMultiInt, 0);
                 else
                     rc = sleepq_timedwait(pEventMultiInt, 0);
+#else
+                if (fInterruptible)
+                    rc = sleepq_timedwait_sig(pEventMultiInt);
+                else
+                    rc = sleepq_timedwait(pEventMultiInt);
+#endif
             }
             else
             {
                 RTSpinlockRelease(pEventMultiInt->hSpinLock, &Tmp);
 
+#if __FreeBSD_version >=800026
                 if (fInterruptible)
                     rc = sleepq_wait_sig(pEventMultiInt, 0);
                 else
@@ -231,6 +239,15 @@ static int rtSemEventMultiWait(RTSEMEVEN
                     rc = 0;
                     sleepq_wait(pEventMultiInt, 0);
                 }
+#else
+                if (fInterruptible)
+                    rc = sleepq_wait_sig(pEventMultiInt);
+                else
+                {
+                    rc = 0;
+                    sleepq_wait(pEventMultiInt);
+                }
+#endif
             }
 
             RTSpinlockAcquire(pEventMultiInt->hSpinLock, &Tmp);