From f30933ece650976ed9afd6f836c99089e84c7621 Mon Sep 17 00:00:00 2001 From: Jonathan Lamb Date: Wed, 2 May 2018 13:00:07 -0700 Subject: [PATCH] Add documentation around issue --- libsel4-sys/src/lib.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/libsel4-sys/src/lib.rs b/libsel4-sys/src/lib.rs index 9850ab7..3d3dcef 100644 --- a/libsel4-sys/src/lib.rs +++ b/libsel4-sys/src/lib.rs @@ -73,6 +73,26 @@ pub unsafe extern "C" fn strcpy( } #[cfg(target = "arm-sel4-helios")] +/// Number of bits in a `seL4_Word`. +/// +/// # Remarks +/// +/// Normally this is defined as the following macro: +/// ``` +/// #define seL4_WordBits (sizeof(seL4_Word) * 8) +/// ``` +/// +/// For our `arm-sel4-helios` target see file: +/// `libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/constants.h` +/// +/// However due to bindgen not being able to expand functional +/// macros, the type gets ignored. +/// +/// For the time being, we just provide the constant here. +/// +/// See following issues for more information: +/// - `rust-bindgen/issues/753` +/// - `feL4-dependencies/issues/18` pub const seL4_WordBits: u32 = 32; include!(concat!(env!("OUT_DIR"), "/bindings.rs"));