Skip to content

Commit 14cd08b

Browse files
committed
Remove is_next_slot_writer
1 parent 3a43dfc commit 14cd08b

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

src/rt/sched/behaviourcore.h

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,6 @@ namespace verona::rt
174174
NEXT_SLOT_TYPE_BITS) == NEXT_SLOT_READER_FLAG;
175175
}
176176

177-
/**
178-
* Returns true if the next slot wants to acquire in write mode
179-
*/
180-
bool is_next_slot_writer()
181-
{
182-
return ((status.load(std::memory_order_acquire) >> NEXT_SLOT_TYPE_SHIFT) &
183-
NEXT_SLOT_TYPE_BITS) == NEXT_SLOT_WRITER_FLAG;
184-
}
185-
186177
/**
187178
* Returns true if all the slots in a behaviour haven't finished their acquire phase
188179
*/
@@ -290,7 +281,7 @@ namespace verona::rt
290281
*/
291282
BehaviourCore* next_behaviour()
292283
{
293-
assert(is_next_slot_writer());
284+
assert(!is_next_slot_read_only());
294285
return (
295286
BehaviourCore*)((status.load(std::memory_order_acquire) >> NEXT_POINTER_SHIFT) << NEXT_POINTER_SHIFT);
296287
}
@@ -972,7 +963,7 @@ namespace verona::rt
972963

973964
if(is_read_only())
974965
{
975-
if (is_next_slot_writer())
966+
if (!is_next_slot_read_only())
976967
{
977968
Logging::cout() << *this << "Reader setting next writer variable "
978969
<< next_behaviour() << Logging::endl;
@@ -1003,8 +994,8 @@ namespace verona::rt
1003994
}
1004995
return;
1005996
}
1006-
1007-
if(is_next_slot_writer()) {
997+
998+
if(!is_next_slot_read_only()) {
1008999
Logging::cout() << *this
10091000
<< " Writer waking up next writer cown next slot "
10101001
<< *next_behaviour() << Logging::endl;

0 commit comments

Comments
 (0)