os/ossrv/glib/gthread/gthread_wsd.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/glib/gthread/gthread_wsd.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,60 @@
     1.4 +/*
     1.5 +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description: 
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +
    1.23 +
    1.24 +
    1.25 +#include <e32std.h>
    1.26 +#include <_ansi.h>
    1.27 +#include "gthread_wsd.h"
    1.28 +#include <glib.h>
    1.29 +
    1.30 +
    1.31 +#if EMULATOR
    1.32 +#include <pls.h> // For emulator WSD API 
    1.33 +const TUid KLibgthreadUid3 = {0x10281F3A};     // This is the UID of the library
    1.34 +
    1.35 +G_BEGIN_DECLS
    1.36 +extern const GThreadFunctions temp_g_thread_functions_for_glib_use_default;
    1.37 +
    1.38 +int InitializeWsd(struct global_struct* g)
    1.39 +{
    1.40 +	memset(g,0,sizeof(struct global_struct));
    1.41 +//	memcpy(&(g->VARIABLE_NAME(g_thread_functions_for_glib_use_default ,gthread_posix)),&g_thread_functions_for_glib_use_default_temp,sizeof(GThreadFunctions));	
    1.42 +	return KErrNone;
    1.43 +}
    1.44 +
    1.45 +
    1.46 +struct global_struct *Gthread_ImpurePtr()
    1.47 +{
    1.48 +#if defined(__WINSCW__) || defined(__WINS__)
    1.49 +
    1.50 +	// Access the PLS of this process
    1.51 +	struct global_struct* p  = Pls<struct global_struct>(KLibgthreadUid3, &InitializeWsd);
    1.52 +    return p;	
    1.53 +
    1.54 +#else
    1.55 +		
    1.56 +	return NULL;
    1.57 +
    1.58 +#endif
    1.59 +}
    1.60 +
    1.61 +G_END_DECLS
    1.62 +#endif /* EMULATOR */ 
    1.63 +