From 9caf20c29956be283b032110096a81f99a121da7 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Wed, 22 Jun 2016 19:08:19 -0700 Subject: converters: Clarifying comment re packing --- host/lib/convert/convert_pack_sc12.cpp | 5 +++++ host/lib/convert/convert_unpack_sc12.cpp | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'host') diff --git a/host/lib/convert/convert_pack_sc12.cpp b/host/lib/convert/convert_pack_sc12.cpp index 322097e34..370e4a3e4 100644 --- a/host/lib/convert/convert_pack_sc12.cpp +++ b/host/lib/convert/convert_pack_sc12.cpp @@ -25,6 +25,11 @@ using namespace uhd::convert; typedef boost::uint32_t (*towire32_type)(boost::uint32_t); +/* C language specification requires this to be packed + * (i.e., line0, line1, line2 will be in adjacent memory locations). + * If this was not true, we'd need compiler flags here to specify + * alignment/packing. + */ struct item32_sc12_3x { item32_t line0; diff --git a/host/lib/convert/convert_unpack_sc12.cpp b/host/lib/convert/convert_unpack_sc12.cpp index 94b415355..9f7a84300 100644 --- a/host/lib/convert/convert_unpack_sc12.cpp +++ b/host/lib/convert/convert_unpack_sc12.cpp @@ -25,6 +25,11 @@ using namespace uhd::convert; typedef boost::uint32_t (*tohost32_type)(boost::uint32_t); +/* C language specification requires this to be packed + * (i.e., line0, line1, line2 will be in adjacent memory locations). + * If this was not true, we'd need compiler flags here to specify + * alignment/packing. + */ struct item32_sc12_3x { item32_t line0; -- cgit v1.2.3