[][src]Macro threadstack::declare_thread_stacks

macro_rules! declare_thread_stacks {
    () => { ... };
    ($(#[$attr:meta])* $vis:vis $name:ident: $t:ty = $init:expr; $($rest:tt)*) => { ... };
    ($(#[$attr:meta])* $vis:vis $name:ident: $t:ty = $init:expr) => { ... };
}

Macro used to declare one or more thread stacks. The syntax pretty closely mirrors thread_local! from the standard library, except that the static key word is not used.

Example

   use threadstack::declare_thread_stacks;

   declare_thread_stacks!(
       FOO: u32 = 0xDEADBEEFu32;
       pub BAR: u32 = 0xDEADBEEFu32;
   );

Note that the value on the right side of the equal sign is only the initial value (which may be overridden by calls to push_thread_stack_value).