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