sl@0: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // e32/include/nkernsmp/emievents.h sl@0: // sl@0: // WARNING: This file contains some APIs which are internal and are subject sl@0: // to change without notice. Such APIs should therefore not be used sl@0: // outside the Kernel and Hardware Services package. sl@0: // sl@0: sl@0: #ifndef __EMIEVENTS_H__ sl@0: #define __EMIEVENTS_H__ sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: sl@0: Defines the format of a task event record. sl@0: sl@0: An item of this type is passed to: sl@0: sl@0: -# EMI::GetTaskEvent() sl@0: -# EMI::AddTaskEvent() sl@0: */ sl@0: struct TTaskEventRecord sl@0: { sl@0: /** sl@0: Defines the type of event: sl@0: sl@0: 0 = Reschedule sl@0: 1..127 = Reserved sl@0: > 127 = User Defined sl@0: */ sl@0: TUint8 iType; sl@0: sl@0: sl@0: /** sl@0: Flag bits. sl@0: sl@0: Bit 0 - Events have been lost before this event. (All types) sl@0: Bit 1 - Previous thread is now waiting. (Reschedule only) sl@0: */ sl@0: TUint8 iFlags; sl@0: sl@0: sl@0: /** sl@0: This has no use in reschedule events, but may be used by other event types. sl@0: */ sl@0: TUint16 iExtra; sl@0: sl@0: sl@0: /** sl@0: The state variable at the time of the event, which will sl@0: probably indicate the clock frequency at the time of the event. sl@0: */ sl@0: TUint32 iUserState; sl@0: sl@0: sl@0: /** sl@0: The time that the event occurred. sl@0: sl@0: The units are defined by the GET_HIGH_RES_TICK macro. sl@0: */ sl@0: TUint32 iTime; sl@0: sl@0: sl@0: /** sl@0: The NThread that was executing before the switch. sl@0: */ sl@0: TAny* iPrevious; sl@0: sl@0: sl@0: /** sl@0: The NThread that was executing after the switch. sl@0: */ sl@0: TAny* iNext; sl@0: }; sl@0: sl@0: const TUint8 KTskEvtFlag_EventLost =1; sl@0: const TUint8 KTskEvtFlag_PrevWaiting=2; sl@0: sl@0: #endif