Commit 9ab87fe1 authored by Josh Snyder's avatar Josh Snyder Committed by Peter V. Saveliev

taskstats: fix padding

The ac_uid field is aligned on an 8-byte boundary: pad to suit it (#295)

Python's built in padding doesn't work in this case because we have a
4-byte field with __attribute__((aligned(8))) specified on it.
parent d3aee5ee
......@@ -48,7 +48,9 @@ class tstats(nla):
('cpu_run_virtual_total', 'Q'), # 8
('ac_comm', '32s'), # 32 +++ 112
('ac_sched', 'B'), # 1
('__pad', '3x'), # 1 --- 8 (!)
('__ac_pad', '3x'), # 3
# (the ac_uid field is aligned(8), so we add more padding)
('__implicit_pad', '4x'), # 4
('ac_uid', 'I'), # 4 +++ 120
('ac_gid', 'I'), # 4
('ac_pid', 'I'), # 4
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment