From 65219810a41f1c903838185a766baeba8954cc88 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Fri, 27 Sep 2019 15:49:03 +0000 Subject: rts: Add assertions for task ownership of capabilities --- rts/Capability.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rts/Capability.h') diff --git a/rts/Capability.h b/rts/Capability.h index 87ec53801a..6c8ac78cb6 100644 --- a/rts/Capability.h +++ b/rts/Capability.h @@ -182,10 +182,10 @@ struct Capability_ { #endif // These properties should be true when a Task is holding a Capability -#define ASSERT_FULL_CAPABILITY_INVARIANTS(cap,task) \ - ASSERT(cap->running_task != NULL && cap->running_task == task); \ - ASSERT(task->cap == cap); \ - ASSERT_PARTIAL_CAPABILITY_INVARIANTS(cap,task) +#define ASSERT_FULL_CAPABILITY_INVARIANTS(_cap,_task) \ + ASSERT(_cap->running_task != NULL && _cap->running_task == _task); \ + ASSERT(_task->cap == _cap); \ + ASSERT_PARTIAL_CAPABILITY_INVARIANTS(_cap,_task) // This assert requires cap->lock to be held, so it can't be part of // ASSERT_PARTIAL_CAPABILITY_INVARIANTS() -- cgit v1.2.1