|
1 // Copyright (c) 2007-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 // e32/include/nkernsmp/emievents.h |
|
15 // |
|
16 // WARNING: This file contains some APIs which are internal and are subject |
|
17 // to change without notice. Such APIs should therefore not be used |
|
18 // outside the Kernel and Hardware Services package. |
|
19 // |
|
20 |
|
21 #ifndef __EMIEVENTS_H__ |
|
22 #define __EMIEVENTS_H__ |
|
23 |
|
24 /** |
|
25 @publishedPartner |
|
26 @released |
|
27 |
|
28 Defines the format of a task event record. |
|
29 |
|
30 An item of this type is passed to: |
|
31 |
|
32 -# EMI::GetTaskEvent() |
|
33 -# EMI::AddTaskEvent() |
|
34 */ |
|
35 struct TTaskEventRecord |
|
36 { |
|
37 /** |
|
38 Defines the type of event: |
|
39 |
|
40 0 = Reschedule |
|
41 1..127 = Reserved |
|
42 > 127 = User Defined |
|
43 */ |
|
44 TUint8 iType; |
|
45 |
|
46 |
|
47 /** |
|
48 Flag bits. |
|
49 |
|
50 Bit 0 - Events have been lost before this event. (All types) |
|
51 Bit 1 - Previous thread is now waiting. (Reschedule only) |
|
52 */ |
|
53 TUint8 iFlags; |
|
54 |
|
55 |
|
56 /** |
|
57 This has no use in reschedule events, but may be used by other event types. |
|
58 */ |
|
59 TUint16 iExtra; |
|
60 |
|
61 |
|
62 /** |
|
63 The state variable at the time of the event, which will |
|
64 probably indicate the clock frequency at the time of the event. |
|
65 */ |
|
66 TUint32 iUserState; |
|
67 |
|
68 |
|
69 /** |
|
70 The time that the event occurred. |
|
71 |
|
72 The units are defined by the GET_HIGH_RES_TICK macro. |
|
73 */ |
|
74 TUint32 iTime; |
|
75 |
|
76 |
|
77 /** |
|
78 The NThread that was executing before the switch. |
|
79 */ |
|
80 TAny* iPrevious; |
|
81 |
|
82 |
|
83 /** |
|
84 The NThread that was executing after the switch. |
|
85 */ |
|
86 TAny* iNext; |
|
87 }; |
|
88 |
|
89 const TUint8 KTskEvtFlag_EventLost =1; |
|
90 const TUint8 KTskEvtFlag_PrevWaiting=2; |
|
91 |
|
92 #endif |