diff options
author | Erik de Castro Lopo <erikd@mega-nerd.com> | 2016-05-12 15:45:00 +0200 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-05-12 17:33:39 +0200 |
commit | 995cf0f356ef3a8b7a394de640a853fd6ca9c2b5 (patch) | |
tree | 54cac37b35be9896ea94e8db806a2bd5cf8ae431 /rts/Capability.h | |
parent | 69c974fef825cfc286c9cad17ed8f4e138bf84fc (diff) | |
download | haskell-995cf0f356ef3a8b7a394de640a853fd6ca9c2b5.tar.gz |
rts: Make function pointer parameters `const` where possible
If a function takes a pointer parameter and doesn't update what
the pointer points to, we can add `const` to the parameter
declaration to document that no updates occur.
Test Plan: Validate on Linux, OS X and Windows
Reviewers: austin, Phyx, bgamari, simonmar, hsyl20
Reviewed By: bgamari, simonmar, hsyl20
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2200
Diffstat (limited to 'rts/Capability.h')
-rw-r--r-- | rts/Capability.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/Capability.h b/rts/Capability.h index 46ae8b9ea3..22c1d2a5c7 100644 --- a/rts/Capability.h +++ b/rts/Capability.h @@ -260,7 +260,7 @@ extern PendingSync * volatile pending_sync; // void waitForCapability (Capability **cap/*in/out*/, Task *task); -EXTERN_INLINE void recordMutableCap (StgClosure *p, Capability *cap, +EXTERN_INLINE void recordMutableCap (const StgClosure *p, Capability *cap, uint32_t gen); EXTERN_INLINE void recordClosureMutated (Capability *cap, StgClosure *p); @@ -354,7 +354,7 @@ INLINE_HEADER rtsBool emptyInbox(Capability *cap); * -------------------------------------------------------------------------- */ EXTERN_INLINE void -recordMutableCap (StgClosure *p, Capability *cap, uint32_t gen) +recordMutableCap (const StgClosure *p, Capability *cap, uint32_t gen) { bdescr *bd; |