Update contrib.
1 // Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32\euser\epoc\up_dll_tls.cpp
15 // This file contains DLL stub functions relating to TLS
27 Sets the value of the Thread Local Storage (TLS) variable.
29 @param aPtr The value to be assigned to the Thread Local Storage variable.
30 In practice, this is almost always a pointer to memory
31 that has previously been allocated, but does not necessarily
34 @return KErrNone, if successful, otherwise one of the other
35 system-wide error codes.
37 TInt Dll::SetTls(TAny* aPtr)
40 return UserSvr::DllSetTls(MODULE_HANDLE, *(((TInt*)MODULE_HANDLE)+3), aPtr);
42 return UserSvr::DllSetTls(MODULE_HANDLE, KDllUid_Special, aPtr);
50 Gets the value of the Thread Local Storage (TLS) variable.
52 @return The value of the Thread Local Storage variable as set by
53 a previous call to Dll::SetTls(). If no value has previously
54 been set, then the returned value is NULL.
59 return UserSvr::DllTls(MODULE_HANDLE, *(((TInt*)MODULE_HANDLE)+3));
61 return UserSvr::DllTls(MODULE_HANDLE, KDllUid_Special);
69 Removes the Thread Local Storage (TLS) variable.
71 A subsequent call to Dll::Tls() will return NULL.
76 UserSvr::DllFreeTls(MODULE_HANDLE);