~ubuntu-branches/ubuntu/trusty/virtualbox-ose/trusty

« back to all changes in this revision

Viewing changes to src/VBox/Runtime/r0drv/linux/semeventmulti-r0drv-linux.c

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-12-18 16:44:29 UTC
  • mfrom: (0.3.3 upstream) (0.4.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091218164429-jd34ccexpv5na11a
Tags: 3.1.2-dfsg-1ubuntu1
* Merge from Debian unstable (LP: #498219), remaining changes:
  - Disable update action
    - debian/patches/u01-disable-update-action.dpatch
  - VirtualBox should go in Accessories, not in System tools (LP: #288590)
    - debian/virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add Apport hook
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Add Launchpad integration
    - debian/control
    - debian/lpi-bug.xpm
    - debian/patches/u02-lp-integration.dpatch
* Fixes the following bugs:
  - Kernel module fails to build with Linux >= 2.6.32 (LP: #474625)
  - X.Org drivers need to be rebuilt against X-Server 1.7 (LP: #495935)
  - The *-source packages try to build the kernel modules even though the
    kernel headers aren't available (LP: #473334)
* Replace *-source packages with transitional packages for *-dkms.
* Adapt u01-disable-update-action.dpatch and u02-lp-integration.dpatch for
  new upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
*   Header Files                                                               *
34
34
*******************************************************************************/
35
35
#include "the-linux-kernel.h"
 
36
#include "internal/iprt.h"
36
37
#include <iprt/semaphore.h>
37
38
#include <iprt/alloc.h>
38
39
#include <iprt/assert.h>
73
74
    }
74
75
    return VERR_NO_MEMORY;
75
76
}
 
77
RT_EXPORT_SYMBOL(RTSemEventMultiCreate);
76
78
 
77
79
 
78
80
RTDECL(int) RTSemEventMultiDestroy(RTSEMEVENTMULTI EventMultiSem)
96
98
    RTMemFree(pThis);
97
99
    return VINF_SUCCESS;
98
100
}
 
101
RT_EXPORT_SYMBOL(RTSemEventMultiDestroy);
99
102
 
100
103
 
101
104
RTDECL(int) RTSemEventMultiSignal(RTSEMEVENTMULTI EventMultiSem)
116
119
    wake_up_all(&pThis->Head);
117
120
    return VINF_SUCCESS;
118
121
}
 
122
RT_EXPORT_SYMBOL(RTSemEventMultiSignal);
119
123
 
120
124
 
121
125
RTDECL(int) RTSemEventMultiReset(RTSEMEVENTMULTI EventMultiSem)
135
139
    ASMAtomicXchgU32(&pThis->fState, 0);
136
140
    return VINF_SUCCESS;
137
141
}
 
142
RT_EXPORT_SYMBOL(RTSemEventMultiReset);
138
143
 
139
144
 
140
145
/**
175
180
        /* wait */
176
181
        lTimeout = schedule_timeout(lTimeout);
177
182
 
 
183
        after_wait(&Wait);
 
184
 
178
185
        /* Check if someone destroyed the semaphore while we were waiting. */
179
186
        if (pThis->u32Magic != RTSEMEVENTMULTI_MAGIC)
180
187
        {
210
217
        return VINF_SUCCESS;
211
218
    return rtSemEventMultiWait(pThis, cMillies, false /* fInterruptible */);
212
219
}
 
220
RT_EXPORT_SYMBOL(RTSemEventMultiWait);
213
221
 
214
222
 
215
223
RTDECL(int) RTSemEventMultiWaitNoResume(RTSEMEVENTMULTI EventMultiSem, unsigned cMillies)
224
232
        return VINF_SUCCESS;
225
233
    return rtSemEventMultiWait(pThis, cMillies, true /* fInterruptible */);
226
234
}
 
235
RT_EXPORT_SYMBOL(RTSemEventMultiWaitNoResume);
227
236