os/kernelhwsrv/kernel/eka/include/nkern/emievents.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 // WARNING: This file contains some APIs which are internal and are subject
    16 //          to change without notice. Such APIs should therefore not be used
    17 //          outside the Kernel and Hardware Services package.
    18 //
    19 
    20 #ifndef __EMIEVENTS_H__
    21 #define __EMIEVENTS_H__
    22 
    23 /**
    24 @publishedPartner
    25 @released
    26 
    27 Defines the format of a task event record.
    28 
    29 An item of this type is passed to:
    30 
    31 -# EMI::GetTaskEvent()
    32 -# EMI::AddTaskEvent()
    33 */
    34 struct TTaskEventRecord
    35 	{
    36 	/**
    37 	Defines the type of event:
    38 	
    39     0 = Reschedule 
    40     1..127 = Reserved
    41 	> 127 = User Defined
    42 	*/
    43 	TUint8	iType;	
    44 				
    45 						
    46 	/**
    47 	Flag bits.
    48 	
    49     Bit 0 - Events have been lost before this event. (All types) 
    50 	Bit 1 - Previous thread is now waiting. (Reschedule only)
    51 	*/					
    52 	TUint8	iFlags;
    53 	
    54 	
    55 	/**
    56 	This has no use in reschedule events, but may be used by other event types.
    57 	*/
    58 	TUint16	iExtra;
    59 	
    60 	
    61 	/**
    62 	The state variable at the time of the event, which will
    63 	probably indicate the clock frequency at the time of the event.
    64 	*/
    65 	TUint32	iUserState;
    66 	
    67 	
    68 	/**
    69 	The time that the event occurred.
    70 	
    71 	The units are defined by the GET_HIGH_RES_TICK macro.
    72 	*/
    73 	TUint32	iTime;
    74 	
    75 	
    76 	/**
    77 	The NThread that was executing before the switch.
    78 	*/
    79 	TAny*	iPrevious;
    80 	
    81 	
    82 	/**
    83 	The NThread that was executing after the switch.
    84 	*/
    85 	TAny*	iNext;
    86 	};
    87 
    88 const TUint8 KTskEvtFlag_EventLost  =1;
    89 const TUint8 KTskEvtFlag_PrevWaiting=2;
    90 
    91 #endif