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
15041504
15051505 std::pair<llvm::Optional<std::string>, ActorInfo>
15061506 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>>;
15081512
15091513 auto ActorObj = readObj<DefaultActorImpl>(ActorPtr);
15101514 if (!ActorObj)
15111515 return {std::string (" failure reading actor" ), {}};
15121516
15131517 ActorInfo Info{};
1514- Info.Flags = ActorObj->Flags ;
1518+ Info.Flags = ActorObj->Status . Flags [ 0 ] ;
15151519
15161520 // Status is the low 3 bits of Flags. Status of 0 is Idle. Don't read
15171521 // FirstJob when idle.
15181522 auto Status = Info.Flags & 0x7 ;
15191523 if (Status != 0 ) {
15201524 // 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 );
15221526 }
15231527 return {llvm::None, Info};
15241528 }
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ struct StackAllocator {
9696template <typename Runtime>
9797struct ActiveTaskStatusWithEscalation {
9898 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 ];
100100 typename Runtime::StoredPointer Record;
101101};
102102
@@ -150,10 +150,22 @@ struct FutureAsyncContextPrefix {
150150};
151151
152152template <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>
153166struct DefaultActorImpl {
154167 HeapObject<Runtime> HeapObject;
155- typename Runtime::StoredPointer FirstJob;
156- typename Runtime::StoredSize Flags;
168+ ActiveActorStatus Status;
157169};
158170
159171template <typename Runtime>
You can’t perform that action at this time.
0 commit comments