diff options
author | Simon Marlow <marlowsd@gmail.com> | 2008-12-02 12:07:35 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2008-12-02 12:07:35 +0000 |
commit | 164be7854f6de07bb4bc15f60af727ddb562cde7 (patch) | |
tree | 1a731627a6d78e425098f27082aa428fead2cd25 /rts/Capability.h | |
parent | c0378a2774a400e2992bc57a7ec580df3f142b29 (diff) | |
download | haskell-164be7854f6de07bb4bc15f60af727ddb562cde7.tar.gz |
Fix more problems caused by padding in the Capability structure
Fixes crashes on Windows and Sparc
Diffstat (limited to 'rts/Capability.h')
-rw-r--r-- | rts/Capability.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/rts/Capability.h b/rts/Capability.h index b6f6440cb8..ba0695c8ee 100644 --- a/rts/Capability.h +++ b/rts/Capability.h @@ -143,12 +143,10 @@ struct Capability_ { // Converts a *StgRegTable into a *Capability. // -#define OFFSET(s_type, field) ((size_t)&(((s_type*)0)->field)) - INLINE_HEADER Capability * regTableToCapability (StgRegTable *reg) { - return (Capability *)((void *)((unsigned char*)reg - OFFSET(Capability,r))); + return (Capability *)((void *)((unsigned char*)reg - FIELD_OFFSET(Capability,r))); } // Initialise the available capabilities. |