~ubuntu-branches/ubuntu/raring/virtualbox-ose/raring

« back to all changes in this revision

Viewing changes to src/VBox/Runtime/r3/win/tls-win.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2011-01-30 23:27:25 UTC
  • mfrom: (0.3.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20110130232725-2ouajjd2ggdet0zd
Tags: 4.0.2-dfsg-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add Apport hook.
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Drop *-source packages.
* Drop ubuntu-01-fix-build-gcc45.patch, fixed upstream.
* Drop ubuntu-02-as-needed.patch, added to the Debian package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: tls-win.cpp $ */
 
1
/* $Id: tls-win.cpp 34507 2010-11-30 13:14:14Z vboxsync $ */
2
2
/** @file
3
3
 * IPRT - Thread Local Storage (TLS), Win32.
4
4
 */
68
68
{
69
69
    if (iTls == NIL_RTTLS)
70
70
        return VINF_SUCCESS;
71
 
    if (TlsFree(iTls))
 
71
    if (TlsFree((DWORD)iTls))
72
72
        return VINF_SUCCESS;
73
73
    return RTErrConvertFromWin32(GetLastError());
74
 
 
75
74
}
76
75
 
77
76
 
78
77
RTR3DECL(void *) RTTlsGet(RTTLS iTls)
79
78
{
80
 
    return TlsGetValue(iTls);
 
79
    return TlsGetValue((DWORD)iTls);
81
80
}
82
81
 
83
82
 
84
83
RTR3DECL(int) RTTlsGetEx(RTTLS iTls, void **ppvValue)
85
84
{
86
 
    void *pv = TlsGetValue(iTls);
 
85
    void *pv = TlsGetValue((DWORD)iTls);
87
86
    if (pv)
88
87
    {
89
88
        *ppvValue = pv;
98
97
 
99
98
RTR3DECL(int) RTTlsSet(RTTLS iTls, void *pvValue)
100
99
{
101
 
    if (TlsSetValue(iTls, pvValue))
 
100
    if (TlsSetValue((DWORD)iTls, pvValue))
102
101
        return VINF_SUCCESS;
103
102
    return RTErrConvertFromWin32(GetLastError());
104
103
}