1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/kernelhwsrv/kerneltest/e32test/debug/d_schedhook.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,90 @@
1.4 +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of the License "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// e32test\debug\d_schedhook.h
1.18 +//
1.19 +//
1.20 +
1.21 +#ifndef __D_SCHEDHOOK_H__
1.22 +#define __D_SCHEDHOOK_H__
1.23 +
1.24 +#include <e32cmn.h>
1.25 +#ifndef __KERNEL_MODE__
1.26 +#include <e32std.h>
1.27 +#endif
1.28 +#include <kernel/arm/arm_types.h>
1.29 +
1.30 +class TCapsTestV01
1.31 + {
1.32 +public:
1.33 + TVersion iVersion;
1.34 + };
1.35 +
1.36 +class RSchedhookTest : public RBusLogicalChannel
1.37 + {
1.38 +public:
1.39 + enum TControl
1.40 + {
1.41 + EInstall,
1.42 + EUninstall,
1.43 + EInsertHooks,
1.44 + ERemoveHooks,
1.45 + EEnableCallback,
1.46 + EDisableCallback,
1.47 + ESetTestThread,
1.48 + EGetTestCount,
1.49 + EGetThreadContext,
1.50 + };
1.51 + enum TRequest
1.52 + {
1.53 + };
1.54 +public:
1.55 +#ifndef __KERNEL_MODE__
1.56 + inline TInt Open();
1.57 + inline TInt Install();
1.58 + inline TInt Uninstall();
1.59 + inline TInt InsertHooks();
1.60 + inline TInt RemoveHooks();
1.61 + inline TInt EnableCallback();
1.62 + inline TInt DisableCallback();
1.63 + inline TInt SetTestThread(TThreadId aThreadId);
1.64 + inline TInt GetTestCount();
1.65 + inline TInt GetThreadContext(TThreadId aThreadId,TDes8& aContext);
1.66 +#endif
1.67 + };
1.68 +
1.69 +#ifndef __KERNEL_MODE__
1.70 +inline TInt RSchedhookTest::Open()
1.71 + { return DoCreate(_L("D_SCHEDHOOK"),TVersion(0,1,1),KNullUnit,NULL,NULL); }
1.72 +inline TInt RSchedhookTest::Install()
1.73 + { return DoControl(EInstall); }
1.74 +inline TInt RSchedhookTest::Uninstall()
1.75 + { return DoControl(EUninstall); }
1.76 +inline TInt RSchedhookTest::InsertHooks()
1.77 + { return DoControl(EInsertHooks); }
1.78 +inline TInt RSchedhookTest::RemoveHooks()
1.79 + { return DoControl(ERemoveHooks); }
1.80 +inline TInt RSchedhookTest::EnableCallback()
1.81 + { return DoControl(EEnableCallback); }
1.82 +inline TInt RSchedhookTest::DisableCallback()
1.83 + { return DoControl(EDisableCallback); }
1.84 +inline TInt RSchedhookTest::SetTestThread(TThreadId aThreadId)
1.85 + { return DoControl(ESetTestThread,(TAny*)(TUint)aThreadId); }
1.86 +inline TInt RSchedhookTest::GetTestCount()
1.87 + { return DoControl(EGetTestCount); }
1.88 +inline TInt RSchedhookTest::GetThreadContext(TThreadId aThreadId,TDes8& aContext)
1.89 + { return DoControl(EGetThreadContext,(TAny*)(TUint)aThreadId,&aContext); }
1.90 +#endif
1.91 +
1.92 +#endif
1.93 +