File tree Expand file tree Collapse file tree 2 files changed +22
-6
lines changed Expand file tree Collapse file tree 2 files changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -1504,21 +1504,25 @@ class ReflectionContext
1504
1504
1505
1505
std::pair<llvm::Optional<std::string>, ActorInfo>
1506
1506
actorInfo (StoredPointer ActorPtr) {
1507
- using DefaultActorImpl = DefaultActorImpl<Runtime>;
1507
+ if (supportsPriorityEscalation) {
1508
+ return {std::string (" Failure reading actor with escalation support" ), {}};
1509
+ }
1510
+
1511
+ using DefaultActorImpl = DefaultActorImpl<Runtime, ActiveActorStatusWithoutEscalation<Runtime>>;
1508
1512
1509
1513
auto ActorObj = readObj<DefaultActorImpl>(ActorPtr);
1510
1514
if (!ActorObj)
1511
1515
return {std::string (" failure reading actor" ), {}};
1512
1516
1513
1517
ActorInfo Info{};
1514
- Info.Flags = ActorObj->Flags ;
1518
+ Info.Flags = ActorObj->Status . Flags [ 0 ] ;
1515
1519
1516
1520
// Status is the low 3 bits of Flags. Status of 0 is Idle. Don't read
1517
1521
// FirstJob when idle.
1518
1522
auto Status = Info.Flags & 0x7 ;
1519
1523
if (Status != 0 ) {
1520
1524
// This is a JobRef which stores flags in the low bits.
1521
- Info.FirstJob = ActorObj->FirstJob & ~StoredPointer (0x3 );
1525
+ Info.FirstJob = ActorObj->Status . FirstJob & ~StoredPointer (0x3 );
1522
1526
}
1523
1527
return {llvm::None, Info};
1524
1528
}
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ struct StackAllocator {
96
96
template <typename Runtime>
97
97
struct ActiveTaskStatusWithEscalation {
98
98
uint32_t Flags;
99
- uint32_t DrainLock [(sizeof (typename Runtime::StoredPointer) == 8 ) ? 1 : 2 ];
99
+ uint32_t ExecutionLock [(sizeof (typename Runtime::StoredPointer) == 8 ) ? 1 : 2 ];
100
100
typename Runtime::StoredPointer Record;
101
101
};
102
102
@@ -150,10 +150,22 @@ struct FutureAsyncContextPrefix {
150
150
};
151
151
152
152
template <typename Runtime>
153
+ struct ActiveActorStatusWithEscalation {
154
+ uint32_t Flags;
155
+ uint32_t DrainLock[(sizeof (typename Runtime::StoredPointer) == 8 ) ? 1 : 2 ];
156
+ typename Runtime::StoredPointer FirstJob;
157
+ };
158
+
159
+ template <typename Runtime>
160
+ struct ActiveActorStatusWithoutEscalation {
161
+ uint32_t Flags[sizeof (typename Runtime::StoredPointer) == 8 ? 2 : 1 ];
162
+ typename Runtime::StoredPointer FirstJob;
163
+ };
164
+
165
+ template <typename Runtime, typename ActiveActorStatus>
153
166
struct DefaultActorImpl {
154
167
HeapObject<Runtime> HeapObject;
155
- typename Runtime::StoredPointer FirstJob;
156
- typename Runtime::StoredSize Flags;
168
+ ActiveActorStatus Status;
157
169
};
158
170
159
171
template <typename Runtime>
You can’t perform that action at this time.
0 commit comments