summaryrefslogtreecommitdiff
path: root/rts/Capability.h
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-09-27 15:49:03 +0000
committerBen Gamari <ben@smart-cactus.org>2020-10-24 21:00:36 -0400
commit65219810a41f1c903838185a766baeba8954cc88 (patch)
treee8978410b5a6026707f6087cd51028f5c910a0e6 /rts/Capability.h
parentf6b4b492d9c112c30ddc0bda2338b143b56faf4c (diff)
downloadhaskell-65219810a41f1c903838185a766baeba8954cc88.tar.gz
rts: Add assertions for task ownership of capabilities
Diffstat (limited to 'rts/Capability.h')
-rw-r--r--rts/Capability.h8
1 files changed, 4 insertions, 4 deletions
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()