sl@0: /* sl@0: * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: #include sl@0: #include <_ansi.h> sl@0: #include "gthread_wsd.h" sl@0: #include sl@0: sl@0: sl@0: #if EMULATOR sl@0: #include // For emulator WSD API sl@0: const TUid KLibgthreadUid3 = {0x10281F3A}; // This is the UID of the library sl@0: sl@0: G_BEGIN_DECLS sl@0: extern const GThreadFunctions temp_g_thread_functions_for_glib_use_default; sl@0: sl@0: int InitializeWsd(struct global_struct* g) sl@0: { sl@0: memset(g,0,sizeof(struct global_struct)); sl@0: // memcpy(&(g->VARIABLE_NAME(g_thread_functions_for_glib_use_default ,gthread_posix)),&g_thread_functions_for_glib_use_default_temp,sizeof(GThreadFunctions)); sl@0: return KErrNone; sl@0: } sl@0: sl@0: sl@0: struct global_struct *Gthread_ImpurePtr() sl@0: { sl@0: #if defined(__WINSCW__) || defined(__WINS__) sl@0: sl@0: // Access the PLS of this process sl@0: struct global_struct* p = Pls(KLibgthreadUid3, &InitializeWsd); sl@0: return p; sl@0: sl@0: #else sl@0: sl@0: return NULL; sl@0: sl@0: #endif sl@0: } sl@0: sl@0: G_END_DECLS sl@0: #endif /* EMULATOR */ sl@0: