diff options
author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2012-09-03 08:01:12 -0400 |
---|---|---|
committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2012-12-06 22:20:27 -0500 |
commit | 93e9d420554ed60cb3fa9fa47d3e97b33556b276 (patch) | |
tree | 63c8a246f182ceff0c1b67f170835025a148aa8b /src | |
parent | 3445e102f16ef5ef0ae0a1c78c16a98ce3d2e5b0 (diff) |
Add control page offset checksstaging
Make sure the kernel and userspace compilers have the same idea of the
layout of the control page.
Diffstat (limited to 'src')
-rw-r--r-- | src/kernel_iface.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/kernel_iface.c b/src/kernel_iface.c index b9c8f59..4cc1af5 100644 --- a/src/kernel_iface.c +++ b/src/kernel_iface.c | |||
@@ -82,7 +82,16 @@ int init_kernel_iface(void) | |||
82 | int err = 0; | 82 | int err = 0; |
83 | long page_size = sysconf(_SC_PAGESIZE); | 83 | long page_size = sysconf(_SC_PAGESIZE); |
84 | 84 | ||
85 | BUILD_BUG_ON(sizeof(union np_flag) != sizeof(uint32_t)); | 85 | BUILD_BUG_ON(sizeof(union np_flag) != sizeof(uint64_t)); |
86 | |||
87 | BUILD_BUG_ON(offsetof(struct control_page, sched.raw) | ||
88 | != LITMUS_CP_OFFSET_SCHED); | ||
89 | BUILD_BUG_ON(offsetof(struct control_page, irq_count) | ||
90 | != LITMUS_CP_OFFSET_IRQ_COUNT); | ||
91 | BUILD_BUG_ON(offsetof(struct control_page, ts_syscall_start) | ||
92 | != LITMUS_CP_OFFSET_TS_SC_START); | ||
93 | BUILD_BUG_ON(offsetof(struct control_page, irq_syscall_start) | ||
94 | != LITMUS_CP_OFFSET_IRQ_SC_START); | ||
86 | 95 | ||
87 | err = map_file(LITMUS_CTRL_DEVICE, (void**) &ctrl_page, CTRL_PAGES * page_size); | 96 | err = map_file(LITMUS_CTRL_DEVICE, (void**) &ctrl_page, CTRL_PAGES * page_size); |
88 | if (err) { | 97 | if (err) { |