os/ossrv/genericopenlibs/posixrealtimeextensions/test/testclock/inc/tclock.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/genericopenlibs/posixrealtimeextensions/test/testclock/inc/tclock.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,108 @@
     1.4 +/*
     1.5 +* Copyright (c) 2008-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 +* Name        : tclock.h
    1.19 +* 
    1.20 +*
    1.21 +*/
    1.22 +
    1.23 +
    1.24 +
    1.25 +#ifndef __TESTCLOCK_H__
    1.26 +#define __TESTCLOCK_H__
    1.27 +
    1.28 +#include <test/testexecutestepbase.h>
    1.29 +#include <unistd.h>
    1.30 +#include <fcntl.h>
    1.31 +#include <string.h>
    1.32 +#include <stdlib.h>
    1.33 +#include <errno.h>
    1.34 +#include <stdio.h>
    1.35 +#include <signal.h>
    1.36 +#include <spawn.h>
    1.37 +#include <time.h>
    1.38 +#include <sys/wait.h>
    1.39 +#include <sys/stat.h>
    1.40 +#include <sys/mman.h>
    1.41 +
    1.42 +_LIT(KTestgetclockid1, "Testgetclockid1");
    1.43 +_LIT(KTestgetclockid2, "Testgetclockid2");
    1.44 +_LIT(KTestgetclockid3, "Testgetclockid3");
    1.45 +_LIT(KTestgetclockid4, "Testgetclockid4");
    1.46 +_LIT(KTestgetclockid5, "Testgetclockid5");
    1.47 +_LIT(KTestclockresolution1, "Testclockresolution1");
    1.48 +_LIT(KTestclockresolution2, "Testclockresolution2");
    1.49 +_LIT(KTestclockresolution3, "Testclockresolution3");
    1.50 +_LIT(KTestclocknanosleep1, "Testclocknanosleep1");
    1.51 +_LIT(KTestclocknanosleep2, "Testclocknanosleep2");
    1.52 +_LIT(KTestclocknanosleep3, "Testclocknanosleep3");
    1.53 +_LIT(KTestclocknanosleep4, "Testclocknanosleep4");
    1.54 +_LIT(KTestclocknanosleep5, "Testclocknanosleep5");
    1.55 +_LIT(KTestclocknanosleep6, "Testclocknanosleep6");
    1.56 +_LIT(KTestclockgettime1, "Testclockgettime1");
    1.57 +_LIT(KTestclockgettime2, "Testclockgettime2");
    1.58 +_LIT(KTestclockgettime3, "Testclockgettime3");
    1.59 +_LIT(KTestclocksettime1, "Testclocksettime1");
    1.60 +_LIT(KTestclocksettime2, "Testclocksettime2");
    1.61 +_LIT(KTestclocksettime3, "Testclocksettime3");
    1.62 +
    1.63 +enum TMode
    1.64 +    {
    1.65 +    TREAD = 0x00,
    1.66 +    TWRITE
    1.67 +    };    
    1.68 +    
    1.69 +class CTestclock : public CTestStep
    1.70 +	{
    1.71 +public:
    1.72 +	~CTestclock(); 
    1.73 +	CTestclock(const TDesC& aStepName);
    1.74 +	TVerdict doTestStepL();
    1.75 +	TVerdict doTestStepPreambleL();
    1.76 +	TVerdict doTestStepPostambleL();
    1.77 +protected:  // Functions from base classes
    1.78 +
    1.79 +	static void* ThreadEntryFunctionW(void* arg);
    1.80 +	static void* ThreadEntryFunctionR(void* arg);
    1.81 +	static void* ThreadEntryFunctionWrite(void* arg);
    1.82 +private:
    1.83 +
    1.84 +        virtual TInt Testgetclockid1 (  );
    1.85 +        virtual TInt Testgetclockid2 (  );
    1.86 +        virtual TInt Testgetclockid3 (  );
    1.87 +        virtual TInt Testgetclockid4 (  ); 
    1.88 +        virtual TInt Testgetclockid5 (  );
    1.89 +        virtual TInt Testclockresolution1 (  );  
    1.90 +        virtual TInt Testclockresolution2 (  );
    1.91 +        virtual TInt Testclockresolution3 (  );
    1.92 +        virtual TInt Testclocknanosleep1 (  );
    1.93 +        virtual TInt Testclocknanosleep2 (  );
    1.94 +        virtual TInt Testclocknanosleep3 (  );
    1.95 +        virtual TInt Testclocknanosleep4 (  );
    1.96 +        virtual TInt Testclocknanosleep5 (  );
    1.97 +        virtual TInt Testclocknanosleep6 (  );
    1.98 +        virtual TInt Testclockgettime1 (  );
    1.99 +        virtual TInt Testclockgettime2 (  );
   1.100 +        virtual TInt Testclockgettime3 (  );  
   1.101 +        virtual TInt Testclocksettime1 (  );  
   1.102 +        virtual TInt Testclocksettime2 (  );  
   1.103 +        virtual TInt Testclocksettime3 (  );  
   1.104 +        
   1.105 +  private:    // Data
   1.106 +		TInt iParamCnt;
   1.107 +        TInt iBlocked;
   1.108 +        TInt iThreadId;
   1.109 +
   1.110 +	};
   1.111 +#endif